下拉菜單在ie6的表現狀態 求解~~
<!doctype?html> <html> <head> <meta?charset="utf-8"> <title>Busy?-?電商</title> <script?type="text/javascript">?? ????function?selectList(){ ????????var?selList=document.getElementById("select_options").style; ????????var?selTriangle=document.getElementById("select_triangle").style; ????????if(selList.display=="none"){ ????????????selList.display="block"; ????????????selTriangle.transform="rotateZ(180deg)"; ????????}else{ ????????????selList.display="none"; ????????????selTriangle.transform="rotateZ(0deg)"; ????????} } </script> <style> body,ul,h3{margin:?0;?padding:?0;} li{list-style:?none;} ??.select{height:22px;?border:1px?solid?#ccc;?line-height:22px;?position:relative;?z-index:4;padding:0?24px?0?10px;?display:inline-block;/*float:left;*/} .show_select{?position:absolute;?top:22px;?left:-1px;?width:100%;?border:1px?solid?#ccc;background:?#fff;font-size:?12px;top:?19px;?} .show_select?li{?color:#999;?text-indent:11px;} .show_select?li:hover{background:#9CF;?color:#fff;} .select?h3{font-size:12px;?font-weight:normal;?height:22px;?line-height:22px;?} #select_triangle{ ????border-width:?4px?4px?0; ????border-style:?solid?dashed?dashed; ????border-color:?rgb(80,?174,?248)?transparent?transparent; ????width:?0;?height:?0; ????overflow:?hidden; ????position:?absolute; ????top:?10px; ????right:?8px; ????transition:0.2s; } </style> </head> <body> ?<div?class="select"?id="select"?onclick="selectList()"> ???????????????????????? <h3>北京市?海淀區?五環內</h3> ????????????????????????????<i?id="select_triangle"></i> ????????????????????????????<ul?class="show_select?hide"?id="select_options"?style="display:?none;"> ???????????????????????????? <li>朝陽區三環</li> ????????????????????????????????<li>朝陽區三環</li> ????????????????????????????????<li>朝陽區三環</li> ????????????????????????????????<li>朝陽區三環</li> ????????????????????????????????<li>朝陽區三環</li> ????????????????????????????</ul> ????????????????????????</div> </body> </html>
老師 這是其中一個下拉菜單的代碼 在其他瀏覽器都沒問題 可是到了ie6就會寬度變成100% 打死也找不出原因 求解釋~~
2015-12-07
兄弟 現在連公司做項目都不用兼容IE6甚至IE7了。你還糾結IE6 不是浪費時間嗎
2015-12-07
給?.select 添加一個width:160px;可以,至于為什么,我也不大清楚
2015-12-07
這是ie6一個很大的Bug.....