{"id":18058,"date":"2020-07-15T08:03:11","date_gmt":"2020-07-15T06:03:11","guid":{"rendered":"https:\/\/www.jng-web.com\/labo\/?p=18058"},"modified":"2020-07-14T10:13:25","modified_gmt":"2020-07-14T08:13:25","slug":"un-effet-de-gradient-colore-sur-du-texte-en-css","status":"publish","type":"post","link":"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/","title":{"rendered":"Un effet de gradient color\u00e9 sur du texte en CSS"},"content":{"rendered":"<div class=\"advads-avant-le-contenu\" id=\"advads-1139101537\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-4944504088214075\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-4944504088214075\" \ndata-ad-slot=\"4514395581\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div><div class=\"advads-test\" style=\"margin-left: auto;margin-right: auto;text-align: center;\" id=\"advads-4055529466\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-4944504088214075\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-4944504088214075\" \ndata-ad-slot=\"4514395581\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div><p>Vous souhaitez ajouter avec l&rsquo;aide des propri\u00e9t\u00e9s CSS un effet de gradient sur un texte. Alors les quelques lignes qui vont suivre sont pour vous.<\/p>\n<p>Tout d&rsquo;abord, cr\u00e9ez un fichier HTML contenant les lignes suivantes :<\/p>\n<pre class=\"brush: html; gutter: true; first-line: 1\">&lt;article&gt;\r\n  &lt;h1&gt;Gradient Text&lt;\/h1&gt;\r\n  &lt;p&gt;linear-gradient() + background-clip + text-fill-color&lt;\/p&gt;\r\n&lt;\/article&gt;<\/pre>\n<p>Enfin, appliquez des styles CSS pour cr\u00e9er l&rsquo;effet de gradient :<\/p>\n<pre class=\"brush: css; gutter: true; first-line: 1\">article {\r\n  background: linear-gradient(\r\n    to right, \r\n    hsl(98 100% 62%), \r\n    hsl(204 100% 59%)\r\n  );\r\n  -webkit-background-clip: text;\r\n  -webkit-text-fill-color: transparent;\r\n  text-align: center;\r\n}\r\n\r\nh1 {\r\n  font-size: 10vmin;\r\n  line-height: 1.1;\r\n}\r\n\r\nbody {\r\n  background: hsl(204 100% 5%);\r\n  \r\n  min-block-size: 100%;\r\n  min-inline-size: 100%;\r\n  box-sizing: border-box;\r\n  display: grid;\r\n  place-content: center;\r\n  font-family: system-ui;\r\n  font-size: min(200%, 5vmin);\r\n}\r\n\r\nh1, p, body {\r\n  margin: 0;\r\n}\r\n\r\np {\r\n  font-family: \"Dank Mono\", ui-monospace, monospace;\r\n}\r\n\r\nhtml {\r\n  block-size: 100%;\r\n  inline-size: 100%;\r\n}<\/pre>\n<p>Aper\u00e7u de l&rsquo;effet gradient sur du texte en CSS :<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-18059\" src=\"https:\/\/www.jng-web.com\/labo\/wp-content\/uploads\/2020\/07\/gradient-text-css.png\" alt=\"gradient text css\" width=\"857\" height=\"359\" srcset=\"https:\/\/jng-web.com\/labo\/wp-content\/uploads\/2020\/07\/gradient-text-css.png 857w, https:\/\/jng-web.com\/labo\/wp-content\/uploads\/2020\/07\/gradient-text-css-300x126.png 300w, https:\/\/jng-web.com\/labo\/wp-content\/uploads\/2020\/07\/gradient-text-css-768x322.png 768w, https:\/\/jng-web.com\/labo\/wp-content\/uploads\/2020\/07\/gradient-text-css-421x176.png 421w\" sizes=\"auto, (max-width: 857px) 100vw, 857px\" \/><\/p>\n<blockquote>\n<p style=\"text-align: center;\">Source : <a href=\"https:\/\/codepen.io\/argyleink\/pen\/OJMEpGp\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/codepen.io\/argyleink\/pen\/OJMEpGp<\/a><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Vous souhaitez ajouter avec l&rsquo;aide des propri\u00e9t\u00e9s CSS un effet de gradient sur un texte. Alors les quelques lignes qui vont suivre sont pour vous. &hellip; <\/p>\n","protected":false},"author":2,"featured_media":18059,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[9],"tags":[28,37],"class_list":["post-18058","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-html-5-et-css-3","tag-css","tag-html"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.9.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Un effet de gradient color\u00e9 sur du texte en CSS - Labo JNG WEB<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Un effet de gradient color\u00e9 sur du texte en CSS - Labo JNG WEB\" \/>\n<meta property=\"og:description\" content=\"Vous souhaitez ajouter avec l&rsquo;aide des propri\u00e9t\u00e9s CSS un effet de gradient sur un texte. Alors les quelques lignes qui vont suivre sont pour vous. &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/\" \/>\n<meta property=\"og:site_name\" content=\"Labo JNG WEB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webmaster.referencement.dijon\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fr-fr.facebook.com\/JNGWEB.webmaster\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-15T06:03:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-07-14T08:13:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jng-web.com\/labo\/wp-content\/uploads\/2020\/07\/gradient-text-css.png\" \/>\n\t<meta property=\"og:image:width\" content=\"857\" \/>\n\t<meta property=\"og:image:height\" content=\"359\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"J\u00e9r\u00f4me\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"J\u00e9r\u00f4me\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/\"},\"author\":{\"name\":\"J\u00e9r\u00f4me\",\"@id\":\"https:\/\/jng-web.com\/labo\/#\/schema\/person\/8dceaae857bc9738baa63b3d19fb4590\"},\"headline\":\"Un effet de gradient color\u00e9 sur du texte en CSS\",\"datePublished\":\"2020-07-15T06:03:11+00:00\",\"dateModified\":\"2020-07-14T08:13:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/\"},\"wordCount\":76,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/jng-web.com\/labo\/#organization\"},\"keywords\":[\"CSS\",\"HTML\"],\"articleSection\":[\"HTML 5 et CSS 3\"],\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/\",\"url\":\"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/\",\"name\":\"Un effet de gradient color\u00e9 sur du texte en CSS - Labo JNG WEB\",\"isPartOf\":{\"@id\":\"https:\/\/jng-web.com\/labo\/#website\"},\"datePublished\":\"2020-07-15T06:03:11+00:00\",\"dateModified\":\"2020-07-14T08:13:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Labo Jng Web\",\"item\":\"https:\/\/jng-web.com\/labo\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML 5 et CSS 3\",\"item\":\"https:\/\/jng-web.com\/labo\/html-5-et-css-3\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Un effet de gradient color\u00e9 sur du texte en CSS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jng-web.com\/labo\/#website\",\"url\":\"https:\/\/jng-web.com\/labo\/\",\"name\":\"Labo JNG WEB\",\"description\":\"R\u00e9f\u00e9rencement, Webmastering, CMS, Logiciels ...\",\"publisher\":{\"@id\":\"https:\/\/jng-web.com\/labo\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jng-web.com\/labo\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jng-web.com\/labo\/#organization\",\"name\":\"JNG WEB \/\/ J\u00e9r\u00f4me Guri\",\"url\":\"https:\/\/jng-web.com\/labo\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/jng-web.com\/labo\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jng-web.com\/labo\/wp-content\/uploads\/2015\/04\/logo.png\",\"contentUrl\":\"https:\/\/jng-web.com\/labo\/wp-content\/uploads\/2015\/04\/logo.png\",\"width\":342,\"height\":110,\"caption\":\"JNG WEB \/\/ J\u00e9r\u00f4me Guri\"},\"image\":{\"@id\":\"https:\/\/jng-web.com\/labo\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webmaster.referencement.dijon\",\"https:\/\/twitter.com\/jng_web\",\"https:\/\/fr.linkedin.com\/in\/jeromeguri\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/jng-web.com\/labo\/#\/schema\/person\/8dceaae857bc9738baa63b3d19fb4590\",\"name\":\"J\u00e9r\u00f4me\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/jng-web.com\/labo\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/21ca560712e7f1303d8c7c22d9ac9254b56517b653bfcb97d6736933471b2ea3?s=96&d=http%3A%2F%2Fwww.jng-web.com%2Flabo%2Fwp-content%2Fuploads%2F2013%2F12%2Favatar-blog-jng-web.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/21ca560712e7f1303d8c7c22d9ac9254b56517b653bfcb97d6736933471b2ea3?s=96&d=http%3A%2F%2Fwww.jng-web.com%2Flabo%2Fwp-content%2Fuploads%2F2013%2F12%2Favatar-blog-jng-web.png&r=g\",\"caption\":\"J\u00e9r\u00f4me\"},\"description\":\"Passionn\u00e9 par le web, je m'int\u00e9resse depuis quelques ann\u00e9es aux technologies de l'information et de la communication, et plus particuli\u00e8rement \u00e0 la cr\u00e9ation et au r\u00e9f\u00e9rencement de sites internet.\",\"sameAs\":[\"http:\/\/www.jng-web.com\",\"https:\/\/fr-fr.facebook.com\/JNGWEB.webmaster\",\"https:\/\/twitter.com\/JngWeb21\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Un effet de gradient color\u00e9 sur du texte en CSS - Labo JNG WEB","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/","og_locale":"fr_FR","og_type":"article","og_title":"Un effet de gradient color\u00e9 sur du texte en CSS - Labo JNG WEB","og_description":"Vous souhaitez ajouter avec l&rsquo;aide des propri\u00e9t\u00e9s CSS un effet de gradient sur un texte. Alors les quelques lignes qui vont suivre sont pour vous. &hellip;","og_url":"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/","og_site_name":"Labo JNG WEB","article_publisher":"https:\/\/www.facebook.com\/webmaster.referencement.dijon","article_author":"https:\/\/fr-fr.facebook.com\/JNGWEB.webmaster","article_published_time":"2020-07-15T06:03:11+00:00","article_modified_time":"2020-07-14T08:13:25+00:00","og_image":[{"width":857,"height":359,"url":"https:\/\/jng-web.com\/labo\/wp-content\/uploads\/2020\/07\/gradient-text-css.png","type":"image\/png"}],"author":"J\u00e9r\u00f4me","twitter_misc":{"\u00c9crit par":"J\u00e9r\u00f4me","Dur\u00e9e de lecture estim\u00e9e":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/#article","isPartOf":{"@id":"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/"},"author":{"name":"J\u00e9r\u00f4me","@id":"https:\/\/jng-web.com\/labo\/#\/schema\/person\/8dceaae857bc9738baa63b3d19fb4590"},"headline":"Un effet de gradient color\u00e9 sur du texte en CSS","datePublished":"2020-07-15T06:03:11+00:00","dateModified":"2020-07-14T08:13:25+00:00","mainEntityOfPage":{"@id":"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/"},"wordCount":76,"commentCount":0,"publisher":{"@id":"https:\/\/jng-web.com\/labo\/#organization"},"keywords":["CSS","HTML"],"articleSection":["HTML 5 et CSS 3"],"inLanguage":"fr-FR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/","url":"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/","name":"Un effet de gradient color\u00e9 sur du texte en CSS - Labo JNG WEB","isPartOf":{"@id":"https:\/\/jng-web.com\/labo\/#website"},"datePublished":"2020-07-15T06:03:11+00:00","dateModified":"2020-07-14T08:13:25+00:00","breadcrumb":{"@id":"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jng-web.com\/labo\/un-effet-de-gradient-colore-sur-du-texte-en-css\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Labo Jng Web","item":"https:\/\/jng-web.com\/labo\/"},{"@type":"ListItem","position":2,"name":"HTML 5 et CSS 3","item":"https:\/\/jng-web.com\/labo\/html-5-et-css-3\/"},{"@type":"ListItem","position":3,"name":"Un effet de gradient color\u00e9 sur du texte en CSS"}]},{"@type":"WebSite","@id":"https:\/\/jng-web.com\/labo\/#website","url":"https:\/\/jng-web.com\/labo\/","name":"Labo JNG WEB","description":"R\u00e9f\u00e9rencement, Webmastering, CMS, Logiciels ...","publisher":{"@id":"https:\/\/jng-web.com\/labo\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jng-web.com\/labo\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/jng-web.com\/labo\/#organization","name":"JNG WEB \/\/ J\u00e9r\u00f4me Guri","url":"https:\/\/jng-web.com\/labo\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/jng-web.com\/labo\/#\/schema\/logo\/image\/","url":"https:\/\/jng-web.com\/labo\/wp-content\/uploads\/2015\/04\/logo.png","contentUrl":"https:\/\/jng-web.com\/labo\/wp-content\/uploads\/2015\/04\/logo.png","width":342,"height":110,"caption":"JNG WEB \/\/ J\u00e9r\u00f4me Guri"},"image":{"@id":"https:\/\/jng-web.com\/labo\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webmaster.referencement.dijon","https:\/\/twitter.com\/jng_web","https:\/\/fr.linkedin.com\/in\/jeromeguri"]},{"@type":"Person","@id":"https:\/\/jng-web.com\/labo\/#\/schema\/person\/8dceaae857bc9738baa63b3d19fb4590","name":"J\u00e9r\u00f4me","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/jng-web.com\/labo\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/21ca560712e7f1303d8c7c22d9ac9254b56517b653bfcb97d6736933471b2ea3?s=96&d=http%3A%2F%2Fwww.jng-web.com%2Flabo%2Fwp-content%2Fuploads%2F2013%2F12%2Favatar-blog-jng-web.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/21ca560712e7f1303d8c7c22d9ac9254b56517b653bfcb97d6736933471b2ea3?s=96&d=http%3A%2F%2Fwww.jng-web.com%2Flabo%2Fwp-content%2Fuploads%2F2013%2F12%2Favatar-blog-jng-web.png&r=g","caption":"J\u00e9r\u00f4me"},"description":"Passionn\u00e9 par le web, je m'int\u00e9resse depuis quelques ann\u00e9es aux technologies de l'information et de la communication, et plus particuli\u00e8rement \u00e0 la cr\u00e9ation et au r\u00e9f\u00e9rencement de sites internet.","sameAs":["http:\/\/www.jng-web.com","https:\/\/fr-fr.facebook.com\/JNGWEB.webmaster","https:\/\/twitter.com\/JngWeb21"]}]}},"views":7016,"_links":{"self":[{"href":"https:\/\/jng-web.com\/labo\/wp-json\/wp\/v2\/posts\/18058","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jng-web.com\/labo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jng-web.com\/labo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jng-web.com\/labo\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jng-web.com\/labo\/wp-json\/wp\/v2\/comments?post=18058"}],"version-history":[{"count":0,"href":"https:\/\/jng-web.com\/labo\/wp-json\/wp\/v2\/posts\/18058\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jng-web.com\/labo\/wp-json\/wp\/v2\/media\/18059"}],"wp:attachment":[{"href":"https:\/\/jng-web.com\/labo\/wp-json\/wp\/v2\/media?parent=18058"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jng-web.com\/labo\/wp-json\/wp\/v2\/categories?post=18058"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jng-web.com\/labo\/wp-json\/wp\/v2\/tags?post=18058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}