Home  >  Article  >  Web Front-end  >  Settings for text hollowing, transparency and shadow effects in CSS3

Settings for text hollowing, transparency and shadow effects in CSS3

不言
不言Original
2018-06-14 17:15:365072browse

This article mainly introduces a summary of examples of text hollowing, transparency value, and shadow effect settings in CSS. Setting the text-stroke-color transparency value can make the text softer to some extent. Friends in need can refer to it. Next

text-fill-color creates hollow text:
Code

-webkit-text-fill-color:transparent;   
-webkit-text-stroke:1px #000;

Effect

201637105111410.png (752×75)

text-stroke-color transparency value makes text softer:
code

background-image:-webkit-linear-gradient(#eee,#000);   
-webkit-background-clip:text;   
-webkit-text-fill-color:transparent;

Effect 1
201637105151945.png (609×90)

code

background-image:-webkit-linear-gradient(#eee,#000);   
-webkit-background-clip:text;   
-webkit-text-fill-color:transparent;   
-webkit-text-stroke:1px transparent;

Effect 2

201637105229256.png (620×72)

Comparison you will find that the text in effect 2 is a little softer than effect 1

text-shadow text shadow
Grammar:

box-reflect:none | [ <length>{2,3} && <color>? ][ , <length>{2,3} && <color>? ]*

Let’s implement a shadowed text example:
Code

text-shadow:2px 2px 0 #000;

Effect
201637105301417.png (622×53)

## text- Shadow has three length parameters, the first one represents horizontal offset, the second one represents vertical offset, and the third one represents blur (optional)

Softer text shadow:
Code

text-shadow:1px 1px 5px #000;

Effect

201637105352727.png (596×46)

Multiple Shades:

Code

text-shadow:1px 1px 5px #000;

Effect


201637105420741.png (578×52)

That’s it The entire content of this article is hoped to be helpful to everyone's study. For more related content, please pay attention to the PHP Chinese website!

Related recommendations:

Use CSS3 to draw basic graphics

The use of CSS3 layer shadows and text shadows

How to use css to make the background image stretch and fill to avoid repeated display

The above is the detailed content of Settings for text hollowing, transparency and shadow effects in CSS3. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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