一、基本原理
<style type="text/css">
.common {
background-color: pink;
border: 1px solid red;
}
</style>
<form id="form1" runat="server">
<div>
<select id="selArea" class="common" style="width: 240px; height: 64px;">
<option selected="selected">区域不限</option>
<option>北京北京北京北京北京</option>
<option value="tj">天津</option>
<option value="sh">上海</option>
<option value="cq">重庆</option>
</select>
<br />
<asp:DropDownList ID="DropDownList1" CssClass="common" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
<asp:ListItem>111</asp:ListItem>
<asp:ListItem>222</asp:ListItem>
<asp:ListItem>333</asp:ListItem>
<asp:ListItem>444</asp:ListItem>
</asp:DropDownList>
</div>
</form>
<script type="text/javascript">
$(document).ready(function () {
$("select").yueSelect({
width: 120,
height: 32,
useSelectSize: true,
listDiff: 2
});
});
</script>
我相信没有人愿意写一份给自己看的博客 ,大家的留言与推荐才是写下去的动力
基于jquery 封装的 select 小控件,解决 IE6 7 8里 select 边框 高度 无法遮挡等问题
原文:http://www.cnblogs.com/koleyang/p/5250744.html