欢迎访问 如意编程网!

如意编程网

当前位置: 首页 > 前端技术 > HTML >内容正文

HTML

简易自定义下拉菜单 与简易默认下拉html片段

发布时间:2022/11/16 HTML 34 老码农
如意编程网 收集整理的这篇文章主要介绍了 简易自定义下拉菜单 与简易默认下拉html片段 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

简易自定义下拉菜单 与简易默认下拉html片段

简易自定义下拉选择 html片段

html:

<div>
<div>T时代C5</div>
<div style="display:none;">
<div>T时代C5</div>
<div>T时代C5</div>
<div>T时代C5</div>
<div>T时代C5</div>
<div>T时代C5</div>
</div>
</div>

css:

 

.select_box{width:208px;height:26px;position:absolute;left:424px;top:80px;cursor:pointer;z-index:6;}
.select_box .selected{width:208px;height:26px;line-height:26px;font-size:15px;text-indent:18px;}
.select_list_box{width:208px;/*height:150px;*//*overflow:hidden;overflow-y:scroll;*/background:#FFF;}
.select_list_box .select_list{width:208px;height:26px;font-size:15px;line-height:26px;text-indent:18px;border-top:1px solid #f5f5f5;}
.select_list_box .select_list:hover{background:#c9c9c9;}

.province{top:205px;z-index:5;}

 

系统默认下拉

html

<div>
<select name="listZhiwei1" size="1"></select>
<select name="listZhiwei2" size="1"></select>
<select name="listZhiwei3" size="1"></select>
</div>

 

css

.select_box { width: 490px; position: relative; z-index: 2; }

.select_box select { width: 151px; height: 55px; margin-right: 8px; }

 

总结

以上是如意编程网为你收集整理的简易自定义下拉菜单 与简易默认下拉html片段的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得如意编程网网站内容还不错,欢迎将如意编程网推荐给好友。