时间:2021-07-01 10:21:17 帮助过:20人阅读
- <meta charset=" utf-8"><meta name="author" content="http://www.51texiao.cn/"><title>蚂蚁部落</title><style type="text/css">li{ list-style-type:none; font-size:12px; color:blue; width:300px; height:30px; line-height:30px; border-bottom:1px dashed blue;}span{ color:red; width:60px; height:30px; float:right;}</style><div> <ul> <li>蚂蚁部落欢迎您<span>2012-12-13</span></li> <li>大家好,好久不见了<span>2012-12-13</span></li> <li>蚂蚁部落<span>2012-12-13</span></li> </ul></div>
以上代码在IE8或者FF浏览器中是正常的,但是在IE6浏览器中时间却换行了。
解决方案:将标签和标签分别浮动起来,分别左右浮动即可。代码如下:
- <meta charset=" utf-8"><meta name="author" content="http://www.51texiao.cn/"><title>蚂蚁部落</title><style type="text/css">li{ list-style-type:none; font-size:12px; color:blue; width:300px; height:30px; line-height:30px; border-bottom:1px dashed blue;}a{ width:240px; height:30px; float:left;}span{ color:red; width:60px; height:30px; float:right;}</style><div> <ul> <li>蚂蚁部落欢迎您<span>2012-12-13</span></li> <li>大家好,好久不见了<span>2012-12-13</span></li> <li>蚂蚁部落<span>2012-12-13</span></li> </ul></div>
原文地址:http://www.51texiao.cn/div_cssjiaocheng/2015/0429/419.html