Home  >  Article  >  Web Front-end  >  ie6 div+css_html/css_WEB-ITnose

ie6 div+css_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:32:371044browse

  这几天做的一个东东,IE6始终无法获取样式。那叫一个纠结,各种询问,还是无果。最后终于让我找原因!废话少说贴出代码

#_top {    height:79px;    background:url(../images/kcfpxt_01.jpg) no-repeat;}#_title div {    padding:40px 0px 0px 100px;    font-size:20px;    color:#FFF;}#_middle {    background: url(../images/kcfpxt_02.jpg);    width: 950px;}#_middle_bottom {    width: 950px;    height:17px;    background: url(../images/kcfpxt_04.jpg) no-repeat;}#_tab_01 {    background:url(../images/tab_01.jpg) no-repeat;    width:929px;    height:30px;    margin:auto;}#_tab_02 {    background:url(../images/tab_02.jpg);    width:929px;    margin:auto;}#_tab_03 {    background:url(../images/tab_03.jpg) no-repeat;    width:929px;    height:35px;    margin:auto;}

<div id="_middle">                <div class="d_clear">                    <div id="_tab_01">                        <div class="d_clear">                            <div class="title">                                <img  src="images/tb.gif"    style="max-width:90%"  style="max-width:90%" / alt="ie6 div+css_html/css_WEB-ITnose" >                            </div>                            <div class="title">                                首页                            </div>                            <div class="title" style="float: right">                                                             </div>                        </div>                    </div>                    <div id="_tab_02">                        <div class="d_clear" style="width: 915px; padding: 10px" align="center">                            考场:                            <input id="txtRoomNum" value="" size="12px" style="width:10em; padding:2px; border:1px solid #CCC;" />                                                                                      <button id="btnsearch" class="btn">                                搜 索                            </button>                              <button id="btnprint" class="btn">                                打 印                            </button>                            <div id="constList" style="margin: auto;"></div>                        </div>                    </div>                    <div id="_tab_03">                        <div class="d_clear"></div>                    </div>                </div>            </div>            <div id="_middle_bottom">            </div>


测试除了Ie6都可以加载样式。

最终想起了还有个IE tester的Debug工具结果发现

样式无法获取。。。。。 这才恍然大悟。。 原来是选择器名字定义的问题。。  IE6无法识别 _top 这种定义方式。。 惭愧啊! 

修改后样式没问题了 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn