如何在字段选择中为所选选项加下划线

时间:2016-04-14 09:31:02

标签: html jsp select option underline

对不起基本问题。我是初学者。

如何在字段select下划线,但相应列表中的其他项(options)没有加下划线?

不幸的是,当我使用属性style="text-decoration: none"标记select,并将style="text-decoration: lined-through"属性设置为选定的option时,字段select中的结果选择值不是下划线。

另一方面,当我使用属性style="text-decoration: lined-through"标记select 所有时,相应的options也会加下划线(尽管 {{1 }} )。

1 个答案:

答案 0 :(得分:0)

您要找的是“:已检查”。

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