>  기사  >  웹 프론트엔드  >  css不知道那里不兼容了_html/css_WEB-ITnose

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

WBOY
WBOY원래의
2016-06-24 12:12:03932검색

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

  •   


引号有问题。
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.