这是为了实现一个效果,而提前作的测试代码!看起来很简单的一个东西,到这会,大约四个小时过去了。不知道是IE6的BUG;还是我自已的BUG!有人问,你的CSS里边写的太麻烦了,呵呵, 你可以用简单的方法试一试;IE6,7,FIREFOX都走一次就知道了。
HTML代码: Example Source Code
[www.21shipin.com]<div id=\"info\">
<ul>
<li><a href=\"#\" hidefocus=\"true\"><img src="../img/divcss/200810515312643377804.gif" alt=\"A\" align=\"absmiddle\" /></a></li>
<li><a href=\"#\" hidefocus=\"true\"><img src="../img/divcss/200810515312648377805.gif" alt=\"B\" align=\"absmiddle\" /></a></li>
<li><a href=\"#\" hidefocus=\"true\"><img src="../img/divcss/200810515312653377806.gif" alt=\"C\" align=\"absmiddle\" /></a></li>
<li><a href=\"#\" hidefocus=\"true\"><img src="../img/divcss/200810515312658377807.gif" alt=\"D\" align=\"absmiddle\" /></a></li>
<li><img src="../img/divcss/200810515312663377808.gif" alt=\"M\" align=\"absmiddle\" /></li>
<li><a href=\"#\" hidefocus=\"true\"><img src="../img/divcss/200810515312668477809.gif" alt=\"E\" align=\"absmiddle\" /></a></li>
<li><a href=\"#\" hidefocus=\"true\"><img src="../img/divcss/2008105153126734778010.gif" alt=\"F\" align=\"absmiddle\" /></a></li>
<li><a href=\"#\" hidefocus=\"true\"><img src="../img/divcss/2008105153126774778011.gif" alt=\"G\" align=\"absmiddle\" /></a></li>
<li><a href=\"#\" hidefocus=\"true\"><img src="../img/divcss/2008105153126824778012.gif" alt=\"H\" align=\"absmiddle\" /></a></li>
<li><img src="../img/divcss/200810515312663377808.gif" alt=\"M\" align=\"absmiddle\" /></li>
<li><a href=\"#\" hidefocus=\"true\"><img src="../img/divcss/2008105153126874778013.gif" alt=\"I\" align=\"absmiddle\" /></a></li>
<li><a href=\"#\" hidefocus=\"true\"><img src="../img/divcss/2008105153126924778014.gif" alt=\"J\" align=\"absmiddle\" /></a></li>
<li><a href=\"#\" hidefocus=\"true\"><img src="../img/divcss/2008105153126974778015.gif" alt=\"K\" align=\"absmiddle\" /></a></li>
<li><a href=\"#\" hidefocus=\"true\"><img src="../img/divcss/200810515312754778016.gif" alt=\"L\" align=\"absmiddle\" /></a></li>
</ul>
</div>
加了hidefocus,是为了去掉点击链接时的虚线。
Example Source Code
[www.21shipin.com]hidefocus=\"true\"
CSS代码: Example Source Code
[www.21shipin.com]*{ margin:0; padding:0; list-style:none; border:none; line-height:1.8;}
#info{ background:#5F768B; padding:10px;}
#info ul{background:url(http://www.zishu.cn/attachments/month_0706/images/bg.gif) repeat-x left top; padding:2px 10px;height:31px;}
#info li{float:left;padding:2px;}
a:link,a:visited{ background:none;float:left;display:block; padding:4px;}
a:hover{background:url(http://www.zishu.cn/attachments/month_0706/images/on.gif) no-repeat left top; float:left; display:block;}
a:active{background:url(http://www.zishu.cn/attachments/month_0706/images/on2.gif) no-repeat left top; float:left; display:block;}
看最终的运行效果:
Source Code to Run
[www.21shipin.com] 说实话,直到写到这里,直到我再次修改这篇文章的时候,这个BUG我才终于处理完。但正常使用是不会有问题的!
本文作者:zishu