子鼠CSS相册效果,是一款图片切换代码,效果在IE6和7中测试过了,另外,由于这个例子中的代码是我从上一个相册中改的,所以代码和CSS不是最优的。有相当大的优化空间。再另外,在现实中,我想也不会有人用这个东西来作相册,我想实现的只是CSS和HTML在一起到底能作什么。 玩呗!
演示:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>子鼠的CSS相册v2.0</title><style>body{ margin:0; padding:0; font-size:12px; background: #333333; line-height:1.7; font-family:Verdana, "宋体"; overflow:hidden }#info{ width:600px; background: #666666; margin-left:auto; margin-right:auto; text-align:center; border:1px solid #FFFFFF; height:400px; margin-top:20px;}h3{ margin:20px 0 0 0; color:#CC0000; font-size:12px;color:#FFF}ul,li{ list-style:none; margin:0; padding:0;}a:active,a:hover{ cursor:pointer}#info #zs img{ width:400px; height:280px; border:7px solid #FFF;}#zs{ height:360px; overflow: hidden; text-align:left; float:left; width:450px; margin-top:20px}#zs ul{ margin:0 0 0 30px;}#zs span{ display:block}#zs a{ display:inline}#nav{ padding-right:10px;width:135px; height:350px; overflow:auto; padding:0; text-align:left; float:left;}#nav a{ display:block}.z{ width:80px; height:56px;display:block; border:1px solid #FFFFFF; margin:4px 0 4px 25px;color:#FFF}.b1{ background:url(/uploads/common/images/wall_s1.jpg)}.b2{ background:url(/uploads/common/images/wall_s2.jpg)}.b3{ background:url(/uploads/common/images/wall_s3.jpg)}.b4{ background:url(/uploads/common/images/wall_s4.jpg)}.b5{ background:url(/uploads/common/images/wall_s5.jpg)}.b6{ background:url(/uploads/common/images/wall_s6.jpg)}#zs li{ display:block; height:400px;}</style></head><body><div id="info"><h3>子鼠的CSS相册v2.0</h3><div id="zs"><ul><li><a name="z1" id="z1"></a><img src="/uploads/common/images/wall1.jpg" alt="照片1" /><br />这是照片1<span><a href="http://www.zishu.cn" target="_blank">子鼠</a></span></li><li><a name="z2" id="z2"></a><img src="/uploads/common/images/wall2.jpg" alt="照片2" /><br />这是照片2<span><a href="#" target="_blank">子鼠</a></span></li><li><a name="z3" id="z3"></a><img src="/uploads/common/images/wall3.jpg" alt="照片3" /><br />这是照片3<span><a href="#" target="_blank">子鼠</a></span></li><li><a name="z4" id="z4"></a><img src="/uploads/common/images/wall4.jpg" alt="照片4" /><br />这是照片4<span><a href="#" target="_blank">子鼠</a></span></li><li><a name="z5" id="z5"></a><img src="/uploads/common/images/wall5.jpg" alt="照片5" /><br />这是照片5<span><a href="#" target="_blank">子鼠</a></span></li><li><a name="z6" id="z6"></a><img src="/uploads/common/images/wall6.jpg" alt="照片6" /><br />这是照片6<span><a href="#" target="_blank">子鼠</a></span></li><li><a name="z7" id="z7"></a><img src="/uploads/common/images/wall1.jpg" alt="照片1" /><br />这是照片1<span><a href="#" target="_blank">子鼠</a></span></li><li><a name="z8" id="z8"></a><img src="/uploads/common/images/wall2.jpg" alt="照片2" /><br />这是照片2<span><a href="#" target="_blank">子鼠</a></span></li></ul></div><div id="nav"><a href="#z1" class="b1 z" title="照片1"></a><a href="#z2" class="b2 z" title="照片2"></a><a href="#z3" class="b3 z" title="照片3"></a><a href="#z4" class="b4 z" title="照片4"></a><a href="#z5" class="b5 z" title="照片5"></a><a href="#z6" class="b6 z" title="照片6"></a><a href="#z7" class="b1 z" title="照片1"></a><a href="#z8" class="b2 z" title="照片2"></a></div></div></body></html><div style="text-align:center;margin:30px 0 0 0;"><hr style="color:#999;height:1px;">如不能显示效果,请按Ctrl+F5刷新本页,更多网页代码:<a href='http://www.wfuyu.com/' target='_blank'>http://www.wfuyu.com/</a></div>提示:可修改后代码再运行!
上一篇 论[揭露代购美国空间背后内幕]的仇富心理
下一篇 搜索结果按匹配字段进行排序