always there for you

善于生活,善于学习,这是我和你的目标.

« 用VB编写ActiveX DLL实现ASP编程解决ASP导出查询结果到Excel中的身份证号问题 »

纯 css 图片轮换

  闲暇时感到无聊...

  做了个图片轮换!.不想用javascript,所以没办法自动轮换!.

  测试页面:  www.alwaysthere.com.cn/Test/csscd/1.html

  源代码:

<html>
 <style>
   a,div,img {border:0px;margin:2px;}
  a{position:relative;display:block;width:100px;height:20px;}
  a.a1 div{position:absolute;left:157px;top:7px;width:600px;height:400px;background:url(1.jpg)};
  a.a1:hover {display:block;background-color:#666}
  a.a1:hover div{display:block;position:absolute;left:157px;top:7px;width:600px;height:400px;background:url(1.jpg)}
  a.a2:hover {display:block;background-color:#666}
  a.a2:hover div{position:absolute;left:157px;top:-97px;width:600px;height:400px;background:url(2.jpg);}
  a.a3:hover {display:block;background-color:#666}
  a.a3:hover div{position:absolute;left:157px;top:-201px;width:600px;height:400px;background:url(3.jpg)}
  a.a4:hover {display:block;background-color:#666}
  a.a4:hover div{position:absolute;left:157px;top:-305px;width:600px;height:400px;background:url(4.jpg)}
 </style>
<body>
 <a href="#" class="a1"><img src="1.jpg" width="150" height="100" /><div></div></a>
 <a href="#" class="a2"><img src="2.jpg" width="150" height="100" /><div></div></a>
 <a href="#" class="a3"><img src="3.jpg" width="150" height="100" /><div></div></a>
 <a href="#" class="a4"><img src="4.jpg" width="150" height="100" /><div></div></a>
</body>
</html>

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

日历

最新评论及回复

最近发表

Copyright www.alwaysthere.com.cn . Some Rights Reserved.

              

Powered By Z-Blog 1.8 Devo Build 80201