常见CSS页面加载失败原因
(1)路径错误
在外部引用CSS样式时,路径选择错误,CSS样式就会不加载。所以在写CSS路径时一定要细心
(2)浏览器兼容性问题
在CSS3中有很多属性对浏览器有兼容问题,比如-moz-为前缀的只适合Firefox浏览器,-webkit-为前缀的适合Chrome浏览器等等,如果在代码中没有考虑兼容性问题,网页效果依旧不会加载出来
例
<style>
div{
width:100px;
height:100px;
background:pink;
animation:demo5s;
-moz-animation:demo5s;/*Firefox*/
-webkit-animation:demo5s;/*Chrome*/
}
@-webkit-keyframesdemo{
from{background:pink;
}
to{background:hotpink;}
}
}
</style>


本文转载自中文网

本文转载自中文网
如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css3-style/c56356.shtml