ZOOM是IE的一个专有属性,其原本的作用被很少提及到,但经常会在一些css样式中看到它出现,这让我对它有些兴趣了。今天解决一个兼容性问题,用Zoom解决的。
.maindiv{border:solid 1px #ccc;margin:3px auto; width:624px;height:400px;}
.h_title{padding:0;margin:0; _line-height:1;background-color:#C8E1FB;}
.s_title{font-size:14px; font-weight:700; padding:5px 10px 3px 10px;display:block;color:#fff;}
.ul-province{_line-height:1; overflow:hidden;margin:0;padding:3px;list-style-type:none;font-size:12px; border:solid 1px #ccc; display:block;zoom:1;}
.div_body{padding:0px 5px 5px 5px;margin-top:3px;}
.ul-province li{ float:left;padding:0; _width:10px; display:block; padding-right:15px; white-space:nowrap; word-break:keep-all;}
.ul-unis{_line-height:1;margin:5px 0; overflow-x:hidden; overflow-y:auto; padding:10px; padding-right:0; height:200px;font-size:12px;border:solid 1px #ccc;}
.ul-unis li{padding:4px 5px;float:left; width:66px;}
.ul-unis li a,.ul-province li a {
display:block;
text-align:center;
height:18px;
line-height:18px;
color:#005EAC;cursor:pointer;
}
.ul-unis li.active a,.ul-province li.active a {
background:#C8E1FB none repeat scroll 0 0;
color:#FFFFFF !important;
dispaly:block;
}
.div-sex{border:solid 1px #ccc; margin-bottom:3px; padding-left:5px;}
#province_unis_select a:link,#province_unis_select a:visited{
color:#005EAC;text-decoration:none
}
#province_unis_select .spWidth{/*width:100px;*/}
#province_unis_select a:hover{color:#005EAC;text-decoration:underline}
<body onload=\'init()\'>
<form runat="server">
<div>
<h2><span>选择所在地区参考值</span></h2>
<div>
<div>
性别:男<input type="radio" checked="checked" />女<input type="radio" />
</div>
<ul>
<li><a href="javascript:void(0);">湖北</a></li>
<li><a>湖北</a></li>
</ul>
<ul>
<li><a>武汉</a></li>
<li><a>湖北</a></li>
</ul>
</div>
</div>
</form>
</body>
<script type="text/javascript">
//页面载入构建省份结构数据 name:名称,code:代码,unis:市,unis.name 市名,unis.val 指标名称
//var data_provinces=[{name:"湖北",code:"1",unis:[{Name:"市1",Val:"1"},{Name:"市2",Val:"2"},{Name:"市3",Val:"3"}]},{name:"湖南",code:"2",unis:[{Name:"",Val:""}]},{name:"广电",code:"3",unis:[{Name:"",Val:""}]}];
var data_provinces = [{"Code":"030101","Name":"上海"},{"Code":"030102","Name":"山东省"},{"Code":"030103","Name":"江苏省"},{"Code":"030104","Name":"安徽省"},{"Code":"030105","Name":"浙江省"},{"Code":"030106","Name":"江西省"},{"Code":"030107","Name":"福建省"},{"Code":"030201","Name":"重庆"},{"Code":"030202","Name":"四川省"},{"Code":"030203","Name":"贵州省"},{"Code":"030204","Name":"云南省"},{"Code":"030205","Name":"西藏自治区"},{"Code":"030301","Name":"北京"},{"Code":"030302","Name":"天津"},{"Code":"030303","Name":"内蒙古自治区"},{"Code":"030304","Name":"河北省"},{"Code":"030305","Name":"山西省"},{"Code":"030401","Name":"河南省"},{"Code":"030402","Name":"湖北省"},{"Code":"030403","Name":"湖南省"},{"Code":"030404","Name":"广西壮族自治区"},{"Code":"030405","Name":"广东省"},{"Code":"030406","Name":"海南省"},{"Code":"030407","Name":" 台@@湾 省"},{"Code":"030408","Name":"香港特别行政区"},{"Code":"030409","Name":"澳门特别行政区"},{"Code":"030501","Name":"陕西省"},{"Code":"030502","Name":"甘肃省"},{"Code":"030503","Name":"宁夏回族自治区"},{"Code":"030504","Name":"青海省"},{"Code":"030505","Name":"新疆维吾尔自治区"},{"Code":"030601","Name":"黑龙江省"},{"Code":"030602","Name":"辽宁省"},{"Code":"030603","Name":"吉林省"}];