How to set the underline to dotted line in css: You can use the text-decoration-style attribute to set it, such as [text-decoration-style: dotted;]. The text-decoration-style attribute is used to specify how lines are displayed.
Related properties:
text-decoration-style property specifies how lines are displayed.
(Learning video sharing: css video tutorial)
Grammar:
text-decoration-style: solid|double|dotted|dashed|wavy|initial|inherit;
Attribute value:
solid Default value. The line will appear as a single line.
double The lines will be displayed as double lines.
dotted The lines will appear as dotted lines.
dashed The lines will appear as dashed lines.
wavy Lines will appear as wavy lines.
initial Set this property to its default value.
inherit Inherit this attribute from the parent element.
Example:
Add a dotted underline to the a tag
<a href="#">css如何设置下划线虚线</a> //css a{ text-decoration-style: dotted; }
Related recommendations: CSS tutorial
The above is the detailed content of How to set underline to dotted line in css. For more information, please follow other related articles on the PHP Chinese website!