<small id='UFZCC'></small><noframes id='UFZCC'>

  • <i id='UFZCC'><tr id='UFZCC'><dt id='UFZCC'><q id='UFZCC'><span id='UFZCC'><b id='UFZCC'><form id='UFZCC'><ins id='UFZCC'></ins><ul id='UFZCC'></ul><sub id='UFZCC'></sub></form><legend id='UFZCC'></legend><bdo id='UFZCC'><pre id='UFZCC'><center id='UFZCC'></center></pre></bdo></b><th id='UFZCC'></th></span></q></dt></tr></i><div id='UFZCC'><tfoot id='UFZCC'></tfoot><dl id='UFZCC'><fieldset id='UFZCC'></fieldset></dl></div>
    • <bdo id='UFZCC'></bdo><ul id='UFZCC'></ul>
  • <tfoot id='UFZCC'></tfoot>

    <legend id='UFZCC'><style id='UFZCC'><dir id='UFZCC'><q id='UFZCC'></q></dir></style></legend>

        css样式div或li在ie6下背景平铺及border边框断线解决技巧

        对于CSS样式中的div或li,在IE6下的背景平铺及border边框断线问题是很常见的。解决这个问题需要具备以下技巧:

          <bdo id='gKzcA'></bdo><ul id='gKzcA'></ul>

          <small id='gKzcA'></small><noframes id='gKzcA'>

            <legend id='gKzcA'><style id='gKzcA'><dir id='gKzcA'><q id='gKzcA'></q></dir></style></legend>

                  <tbody id='gKzcA'></tbody>
              • <i id='gKzcA'><tr id='gKzcA'><dt id='gKzcA'><q id='gKzcA'><span id='gKzcA'><b id='gKzcA'><form id='gKzcA'><ins id='gKzcA'></ins><ul id='gKzcA'></ul><sub id='gKzcA'></sub></form><legend id='gKzcA'></legend><bdo id='gKzcA'><pre id='gKzcA'><center id='gKzcA'></center></pre></bdo></b><th id='gKzcA'></th></span></q></dt></tr></i><div id='gKzcA'><tfoot id='gKzcA'></tfoot><dl id='gKzcA'><fieldset id='gKzcA'></fieldset></dl></div>
                  <tfoot id='gKzcA'></tfoot>
                1. 对于CSS样式中的div或li,在IE6下的背景平铺及border边框断线问题是很常见的。解决这个问题需要具备以下技巧:

                  1. 利用触发IE6布局的hack技巧

                  在IE6中,当元素的宽度或高度值为0时,这个元素的边框就会出现断线的问题。因此,可以利用hack技巧,在样式表中添加以下代码:

                  * html .className {
                      height: 1%;
                  }
                  

                  这个hack技巧会触发IE6的布局模式,从而解决元素边框断线的问题。

                  1. 利用IE6下border和background共存的方法

                  在IE6中,当元素的border和background同时存在时,border会覆盖background,导致background无法平铺。因此,可以利用hack技巧,在样式表中添加以下代码:

                  * html .className {
                      background: none;
                      filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background.png', sizingMethod='scale');
                      zoom: 1;
                  }
                  

                  这个hack技巧会利用AlphaImageLoader滤镜加载背景图片,并通过zoom: 1属性触发IE6布局模式。从而解决背景平铺问题。

                  另外,以下是两个示例说明:

                  示例1:解决背景平铺问题

                  <style type="text/css">
                  .clearfix {
                      width: 100px;
                      height: 50px;
                      background: url(bg.png) repeat-x;
                      border: 1px solid #000;
                  }
                  
                  * html .clearfix {
                      height: 1%;
                  }
                  </style>
                  
                  <div class="clearfix">hello world</div>
                  

                  以上代码中,div元素的背景图采用重复平铺的方式,但在IE6下会出现背景断线的问题。利用hack技巧,在样式表中添加* html .clearfix { height: 1%; }代码,触发IE6布局模式,从而解决背景断线问题。

                  示例2:解决border和background共存问题

                  <style type="text/css">
                  .box {
                      width: 100px;
                      height: 50px;
                      background: url(bg.png) repeat-x;
                      border: 1px solid #000;
                  }
                  
                  * html .box {
                      background: none;
                      filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='bg.png', sizingMethod='scale');
                      zoom: 1;
                  }
                  </style>
                  
                  <div class="box">hello world</div>
                  

                  以上代码中,div元素的边框和背景图共存,但在IE6下会出现背景不平铺的问题。利用hack技巧,在样式表中添加* html .box {background: none;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='bg.png', sizingMethod='scale');zoom: 1;}代码,利用AlphaImageLoader滤镜加载背景图片,从而解决背景不平铺问题。

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  下面是“背景图片自适应浏览器分辨率大小并自动拉伸全屏”的完整攻略。
                  下面是详细讲解“简单但很实用的5个CSS属性”的完整攻略:
                  以下是兼做美工之导航条制作过程分享的完整攻略:
                  JS 控制 CSS 样式表的方式主要有两种:通过修改样式属性来修改元素样式,以及通过切换 CSS 类名来切换元素样式。下面分别给出具体的步骤和示例说明。
                  实现首页动态视频背景,可以使用HTML5的video标签,下面是具体的示例代码和操作步骤:
                  • <legend id='gYWx8'><style id='gYWx8'><dir id='gYWx8'><q id='gYWx8'></q></dir></style></legend>
                      <bdo id='gYWx8'></bdo><ul id='gYWx8'></ul>
                        <tbody id='gYWx8'></tbody>

                          <i id='gYWx8'><tr id='gYWx8'><dt id='gYWx8'><q id='gYWx8'><span id='gYWx8'><b id='gYWx8'><form id='gYWx8'><ins id='gYWx8'></ins><ul id='gYWx8'></ul><sub id='gYWx8'></sub></form><legend id='gYWx8'></legend><bdo id='gYWx8'><pre id='gYWx8'><center id='gYWx8'></center></pre></bdo></b><th id='gYWx8'></th></span></q></dt></tr></i><div id='gYWx8'><tfoot id='gYWx8'></tfoot><dl id='gYWx8'><fieldset id='gYWx8'></fieldset></dl></div>
                        1. <tfoot id='gYWx8'></tfoot>

                          <small id='gYWx8'></small><noframes id='gYWx8'>