css設(shè)置下劃線為虛線的方法:可以利用text-decoration-style屬性來進行設(shè)置,如【text-decoration-style: dotted;】。text-decoration-style屬性用于規(guī)定線條如何顯示。
相關(guān)屬性:
text-decoration-style 屬性規(guī)定線條如何顯示。
(學(xué)習(xí)視頻分享:css視頻教程)
語法:
text-decoration-style: solid|double|dotted|dashed|wavy|initial|inherit;屬性值:
solid 默認值。線條將顯示為單線。
double 線條將顯示為雙線。
dotted 線條將顯示為點狀線。
dashed 線條將顯示為虛線。
wavy 線條將顯示為波浪線。
initial 設(shè)置該屬性為它的默認值。
inherit 從父元素繼承該屬性。
舉例:
給a標(biāo)簽添加虛線下劃線
<a href="#">css如何設(shè)置下劃線虛線</a>//cssa{ text-decoration-style: dotted;}相關(guān)推薦:css教程