Html 如何在“选择”字段中的选定选项下划线
请原谅我提一个基本问题。我是初学者 如何使字段Html 如何在“选择”字段中的选定选项下划线,html,jsp,select,option,underline,Html,Jsp,Select,Option,Underline,请原谅我提一个基本问题。我是初学者 如何使字段中的选定值选择带下划线,但相应列表中的其他项目(选项)不带下划线 不幸的是,当我使用属性style=“text-decoration:none”标记select,以及属性style=“text-decoration:lined-through”到selected选项时,结果字段select中的selected值没有下划线 另一方面,当我使用attributestyle=“text-decoration:lined-through”标记选择时,所有相应
中的选定值选择带下划线,但相应列表中的其他项目(选项
)不带下划线
不幸的是,当我使用属性style=“text-decoration:none”
标记select
,以及属性style=“text-decoration:lined-through”
到selected选项时,结果字段select
中的selected值没有下划线
另一方面,当我使用attributestyle=“text-decoration:lined-through”
标记选择时,所有相应的选项也会加下划线(尽管style=“text-decoration:none”
)。您要查找的是:选中的”
请发布一些HTML。很难猜出你的意思对不起,你是指css还是javascript?
select option:checked {
text-decoration: lined-through; /*or underline if you want*/
}