<div class="select mr10">
<div>
<select name="ddlSheng" id="ddlSheng" style="width: 127px; font-family: 微软雅黑;" class="">
<option selected="selected" value="0">---请选择---</option>
<option value="安徽">安徽</option>
</select>
</div>
</div>
</div>
css样式:
.select * {
margin: 0;
padding: 0;
}
.select {
border:1px solid #c5c5c5;
border-bottom: 1px solid #d9d9d9;
float: left;
height:25px;
display: inline;
padding-top:5px;
/*
margin-top:0;
margin-top:1px \9;
margin-top:1px;
_margin-top:1px;**/
background-color:#fff;
font-family:"微软雅黑","Microsoft YaHei";
}
.select.focus{
border:1px solid #fd5e5e !important;
}
.select div {
float: left;
*height:19px
}
/* 子选择器,在FF等非IE浏览器中识别 */
.select>div {
height: 19px;
overflow:hidden;
}
/* 通配选择符,只在IE浏览器中识别 */
* html .select div select {
display:block;
float: left;
margin: -2px;
height:29px;
}
.select div>select {
display:block;
float:none;
margin:-2px;
padding: 0px;
height:25px;
}
.select:hover {
border:1px solid #d1d1d1; /*鼠标移上的效果*/
}
.select select>option {
text-indent: 2px; /*option在FF等非IE浏览器缩进2px*/
font-family:"微软雅黑","Microsoft YaHei";
}
这篇博客介绍了如何使用CSS样式来实现select控件在IE6、IE7及Firefox 2.0等浏览器中的兼容性处理。通过设置border, padding, margin, display等属性,确保在不同浏览器下的显示一致性。同时,还提供了hover状态和focus状态的样式调整,以及针对各浏览器的特殊样式 hack,如_margin-top和9 hack。"
125810206,13299855,Vue组件通信的12种方法详解,"['前端开发', 'javascript', 'vue.js']
1441

被折叠的 条评论
为什么被折叠?



