Maison  >  Article  >  interface Web  >  css不知道那里不兼容了_html/css_WEB-ITnose

css不知道那里不兼容了_html/css_WEB-ITnose

WBOY
WBOYoriginal
2016-06-24 12:12:03932parcourir

IE6.0是正常的,IE6.0 以上的或谷歌chrome都不能显示 ID为xh里面的东西,请问是那里导致的差异,谢谢了


.show
{
width:230px;
overflow:hidden;
position:relative;
height:110px;
background:#333333;
}
.show.slider
{

height:110px;
margin:0;
width:700px;

}

.show.slider li
{
float:left;
margin:0;
padding:0;
height:110px;
width:230px;
}

.show.slider li img
{
float:left;
margin:0;
padding:0;
height:110px;
width:230px;
display:inline;
border:0;
}


.show.xh
{
position:absolute;
right:20px; 
bottom:10px;
display:inline;
float:left;
}
.show.xh li
{
float: left;
color: #FF7300;
text-align: center;
line-height: 16px;
width: 16px;
height: 16px;
font-family: Arial;
font-size: 12px;
cursor: pointer;
overflow: hidden;
margin: 3px 1px;

background-color: #fff;
}






     

         
  • css不知道那里不兼容了_html/css_WEB-ITnose

  •      
  • css不知道那里不兼容了_html/css_WEB-ITnose

  •      
  • css不知道那里不兼容了_html/css_WEB-ITnose

  •      

     
     

         
  • 1

  •      
  • 2

  •      

     
     
     




回复讨论(解决方案)

我感觉从父节点设置子节点css的时候要加个空格,还有把元素类型写上比较规范
比如.show.xh li
写为 div.show ul.xh li
这样你试试

的确是这样,按照你的写法就正确了,为什么  会有这个情况发生呢,以前都是这么写的,都没啥问题

.a.b 这样的多类选择器,ie6不支持的.

那既然不支持,为什么.a.b在IE6.0是正常显示的,其他就是不正常显示的

你的xh是在show内的,要有空格:   .show   .xh  {}
ie6正常是因为ie不支持.show.xh(无空格)

   


       
  • css不知道那里不兼容了_html/css_WEB-ITnose

  •    
  • css不知道那里不兼容了_html/css_WEB-ITnose

  •    
  • css不知道那里不兼容了_html/css_WEB-ITnose

  •    

你这里写的不标准,第一个images前的双引号是中文的了,改一下就可以了

楼主结贴吧

 


       
  • css不知道那里不兼容了_html/css_WEB-ITnose

  •   
  • css不知道那里不兼容了_html/css_WEB-ITnose

  •   
  • css不知道那里不兼容了_html/css_WEB-ITnose

  •   


引号有问题。
Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn