2016-04-14 31 views
0

請原諒我的基本問題。我是初學者。如何在字段中選擇下劃線選項

如何使字段select中的選定值加下劃線,但對應列表中的另一項(options)未加下劃線?

不幸的是,當我使用屬性style="text-decoration: none"標記select和屬性style="text-decoration: lined-through"選定option,在導致現場select選定值沒有下劃線。

用另一隻手,當我使用屬性style="text-decoration: lined-through"標記相應options變得過於強調select所有(儘管style="text-decoration:none")。

+0

請張貼一些HTML。猜測你的意思不容易 – mplungjan

回答

0

你在找什麼是「:checked」。

select option:checked { 
    text-decoration: lined-through; /*or underline if you want*/ 
} 
+0

不好意思,但是你的意思是css或javascript? – slider

相關問題