dropdownlist 样式

zhangaijiang1006 2010-09-09 03:01:14
asp.net 有谁写过dropdownlist 样式,要漂亮一点的。
...全文
330 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
porschev 2010-09-09
  • 打赏
  • 举报
回复
我们的下拉列表就没漂亮过。。

得过且过。。。
zhangaijiang 2010-09-09
  • 打赏
  • 举报
回复
<script language="javascript" type="text/javascript">
//注册select

//DropDownList1为DropDownList控件的Id,300为线框显示的宽度,280为箭头显示的宽度
new Combox("DropDownList1",300,280);
</script>
龍月 2010-09-09
  • 打赏
  • 举报
回复
学习了
顶楼主
zhangaijiang 2010-09-09
  • 打赏
  • 举报
回复

.DrpBox_normal
{
background:url(../../bg_input.gif) repeat-x bottom; /*图片路径可以自定义*/
background-color:#ffffff;
height:22px;
line-height:22px;
border:1px solid #afdae6;
margin-left:2px;
color:#4d4b4b;
overflow:hidden;

}
.DrpBox_focus
{
background:url(./bg_input.gif) repeat-x bottom; /*图片路径可以自定义*/
background-color:#ffffff;
height:20px;
line-height:20px;
border:1px solid #afdae6;
border-left:4px solid #33cc00;
color:#4d4b4b;
overflow:hidden;
}
.DrpBtn
{
width:20px;
height:22px;
line-height:22px;
float:left;
background-image:url(./ico_drp_btn.gif); /*图片路径可以自定义*/

background-repeat:no-repeat;
background-position:center;
}
.DrpOptionsBox
{
margin-left:2px;
border:solid 1px #afdae6;
position:absolute;
background-color:White;
clear:both;
height:22px;
line-height:22px;
}
.DrpOptions
{
text-indent:2px;
height:22px;
line-height:22px;
clear:both;
overflow:hidden;
clear:both;
}
.DrpOptionsSeled
{
text-indent:2px;
background-color:#afdae6;
height:22px;
line-height:22px;
clear:both;
}
.DrpOptionsOver
{
text-indent:2px;
background-color:#d7ecf2;
height:22px;
line-height:22px;
clear:both;
}

.sDrpBox_normal
{
margin-left:2px;
background-color:#ffffff;
height:22px;
line-height:22px;
border:1px solid #afdae6;
border-left:1px solid #afdae6;
color:#4d4b4b;
overflow:hidden;
}

.DrpInput_normal
{
text-indent:4px;
background-color:#ffffff;
height:22px;
line-height:22px;
color:#4d4b4b;
overflow:hidden;
float:left;
}




由于html的Select元素式样不更改,自已用Javascript写了DropDownList控件,支持分组.调用相当方便,不用更改原来的HTML结构.调用方法:DropDownList.bind(selectId).例如: ---------------------------------
DropDownList2:

110,561

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧