HTML选择具有多种颜色的DropDown列表
发布时间:2020-12-14 18:26:01 所属栏目:资源 来源:网络整理
导读:是否可以在下拉列表中为不同的项目使用不同的颜色? 例如: 选项1 =绿色 选项2 =蓝色 等等 解决方法 这就是你想要的 Styling Dropdown Lists style type="text/css" option.red {background-color: #cc0000; font-weight: bold; font-size: 12px;} option.pi
是否可以在下拉列表中为不同的项目使用不同的颜色?
例如: 选项1 =绿色 解决方法
这就是你想要的
Styling Dropdown Lists
<style type="text/css"> option.red {background-color: #cc0000; font-weight: bold; font-size: 12px;} option.pink {background-color: #ffcccc;} </style> <select name=colors> <option class="red" value= "../getting_started/">Getting Started </option> <option class="pink" value= "../getting_started/html_intro1.htm">- Intro to HTML </option> </select> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |