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

Settings for text hollowing, transparency and shadow effects in CSS3

不言
Release: 2018-06-14 17:15:36
Original
5107 people have browsed it

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;
Copy after login

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;
Copy after login

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;
Copy after login

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>? ]*
Copy after login

Let’s implement a shadowed text example:
Code

text-shadow:2px 2px 0 #000;
Copy after login

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;
Copy after login
Copy after login

Effect

201637105352727.png (596×46)

Multiple Shades:

Code

text-shadow:1px 1px 5px #000;
Copy after login
Copy after login
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!

Related labels:
source:php.cn
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