The
text-shadowstyle ofCSS3 is to set the text shadow effect. Thisattributeoriginally existed in CSS2. The text shadow in CSS3 is applied again, so let’s do it Take a look at how text-shadow needs to be used.
CSS3 words:
text-shadow
Grammar structure
div{text-shadow:5px 2px 6px #000;}
Set the text shadow effect in the div box to start showing the shadow effect 5px from the left and 2px from the top. At the same time, the shadow size range is 6px and the shadow color is black (#000).
There are 4 values for the text display shadow effect. The first value represents the distance from the left to start showing the shadow effect. The second value represents the distance from the left to start showing the shadow effect. The third value represents the size of the shadow range. , the fourth value is the shadow effect color.
Case HTML code
Corresponding CSS code:
.txt {text-shadow:5px 1px 6px #F93 } .txt2 {text-shadow:1px 1px 1px #000; padding:10px 0; color:#FFF; background:#CCC}
The above is how to use text-shadow in CSS3. For more exciting information, please pay attention to other related articles on the php Chinese website!
Related reading:
How to hide the content of overflowing DIV
What are the techniques for CSS layout
The above is the detailed content of How to use CSS3 text-shadow font shadow. For more information, please follow other related articles on the PHP Chinese website!