Home > Article > Web Front-end > How to set text stroke effect in css
How to set the text stroke effect in css: You can use the text-stroke-color attribute to set it, such as [-webkit-text-stroke-color:#ff0;]. The attribute text-stroke-color is used to set or retrieve the stroke color of text in the object.
Related properties:
text-stroke-color:
(Learning video sharing: css video tutorial)
Attribute value:
Compatibility:
Example:
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>text-stroke-color</title> <style> html,body{font:bold 14px/1.5 georgia,simsun,sans-serif;text-align:center;} .stroke h1{margin:0;padding:10px 0 0;} .stroke p{ margin:50px auto 100px;font-size:100px; -webkit-text-stroke-width:2px; -webkit-text-stroke-color:#ff0; } .copyright,.info{font-style:italic;} </style> </head> <body> <body> <div> <h1>描边的文字:</h1> <p>我是被描了2像素黄边的文字</p> </div> </body> </html>
Related recommendations: CSS tutorial
The above is the detailed content of How to set text stroke effect in css. For more information, please follow other related articles on the PHP Chinese website!