How to implement text gradient using css

王林
Release: 2023-05-15 14:52:06
forward
1591 people have browsed it

Text Gradient

The text gradient effect is very popular and can be easily achieved using CSS3:

h3[data-text] {
 position: relative;
}
h3[data-text]::after {
 content: attr(data-text);
 z-index: 10;
 color: #e3e3e3;
 position: absolute;
 top: 0;
 left: 0;
-webkit-mask-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0)), color-stop(50%, rgba(0,0,0,1)), to(rgba(0,0,0,0)));}
Copy after login

The above is the detailed content of How to implement text gradient using css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template