Home  >  Article  >  Web Front-end  >  不用js,让css选择指定索引元素,兼容低版本IE的_html/css_WEB-ITnose

不用js,让css选择指定索引元素,兼容低版本IE的_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:49:53953browse


如图这种效果,2个LI,第一个和第二个中间有空隙最左和最有没空隙,要低版本IE支持,比如IE6,7什么的,只用css能实现吗?


回复讨论(解决方案)

用条件注释判断浏览器.



还有gt lt gte lte

用条件注释判断浏览器.



条件判断又怎么在IE6,7里面让第一个LI和第二个之间有间隔,


用条件注释判断浏览器.



条件判断又怎么在IE6,7里面让第一个LI和第二个之间有间隔,
间隔?那就直接写CSS hack
http://blog.csdn.net/freshlover/article/details/12132801

就两个li?

<style type="text/css">ul{margin:0;padding:0;}li{list-style:none;width:100px;height:50px;background:red;}li.left{float:left;}li.right{float:right;}</style><ul><li class="left"></li><li class="right"></li></ul>

就两个li?

<style type="text/css">ul{margin:0;padding:0;}li{list-style:none;width:100px;height:50px;background:red;}li.left{float:left;}li.right{float:right;}</style><ul><li class="left"></li><li class="right"></li></ul>


不是的,你这样定义很不好的,
建议去看下CSS基础教程。
http://w3school.com.cn/css/index.asp
有时间CSS3的也看下。
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