下面这个DIV+CSS相册制作教程教程由图老师小编精心推荐选出,过程简单易学超容易上手,喜欢就要赶紧get起来哦!
【 tulaoshi.com - Web开发 】
以前用FLASH作过一个FLASH相册—网络版 这个效果有点学这个的意思。
为了一行了的代码,我已经花了两个晚上来想了,结果下来就是感觉IE有点变态。用正常的想法去作,FIREFOX 等浏览器都没有问题,只有IE不可以。只有加那么一行垃圾代码,IE才能正常显示。
以下就是效果:
(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/webkaifa/)(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/webkaifa/)!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" /
titletest div/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:450px; margin-top:20px;}
h3{ margin:30px 0 0 0; color:#CC0000; font-size:12px;color:#FFF}
span{visibility:hidden; position:absolute; overflow:hidden;}
ul,li{ list-style:none; margin:0; padding:0;}
a:active,a:hover{ cursor:pointer}
a:hover span,a:active span{position:absolute; top:90px; z-index:20px; visibility: visible; margin-left:-500px;}
#info img{ width:400px; height:280px; border:7px solid #FFFFFF}
#zs{ height:340px; overflow: auto; width:140px; float:right; margin-top:20px; margin-bottom:50px;}
.z{ width:80px; height:56px;display:block; border:1px solid #FFFFFF; margin:4px 0 4px 25px;color:#FFF}
.b1{ background:url(/articleimg/2006/07/3784/b1.jpg)}
.b2{ background:url(/articleimg/2006/07/3784/b2.jpg)}
.b3{ background:url(/articleimg/2006/07/3784/b3.jpg)}
.b4{ background:url(/articleimg/2006/07/3784/b4.jpg)}
.b5{ background:url(/articleimg/2006/07/3784/b5.jpg)}
.b6{ background:url(/articleimg/2006/07/3784/b6.jpg)}
/style
/head
body
div
h3子鼠的CSS相册/h3
div
ul
lia href="http://www.blueidea.com" target="_blank" title="照片1"spanimg src="/articleimg/2006/07/3784/a1.jpg" alt="照片1" /br /
这是照片1br /
www.blueidea.com/span/a/li
lia href="http://www.blueidea.com" target="_blank" title="照片2"spanimg src="/articleimg/2006/07/3784/a2.jpg" alt="照片2" /br /
这是照片2br /
www.blueidea.com/span/a/li
lia href="http://www.blueidea.com" target="_blank" title="照片3"spanimg src="/articleimg/2006/07/3784/a3.jpg" alt="照片3" /br /
这是照片3br /
www.blueidea.com/span/a/li
lia href="http://www.blueidea.com" target="_blank" title="照片4"spanimg src="/articleimg/2006/07/3784/a4.jpg" alt="照片4" /br /
这是照片4br /
www.blueidea.com/span/a/li
lia href="http://www.blueidea.com" target="_blank" title="照片5"spanimg src="/articleimg/2006/07/3784/a5.jpg" alt="照片5" /br /
这是照片5br /
www.blueidea.com/span/a/li
lia href="http://www.blueidea.com" target="_blank" title="照片6"spanimg src="/articleimg/2006/07/3784/a6.jpg" alt="照片6" /br /
这是照片6br /
www.blueidea.com/span/a/li
lia href="http://www.blueidea.com" target="_blank" title="照片1"spanimg src="/articleimg/2006/07/3784/a1.jpg" alt="照片1" /br /
这是照片1br /
www.blueidea.com/span/a/li
lia href="http://www.blueidea.com" target="_blank" title="照片2"spanimg src="/articleimg/2006/07/3784/a2.jpg" alt="照片2" /br /
这是照片2br /
www.blueidea.com/span/a/li
/ul
/div
/div
/body
/html
这些代码不是最优的,我正在想更好的。
CODE: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:450px; margin-top:20px;}
h3{ margin:30px 0 0 0; color:#CC0000; font-size:12px;color:#FFF}
span{visibility:hidden; position:absolute; overflow:hidden;}
ul,li{ list-style:none; margin:0; padding:0;}
a:active,a:hover{ cursor:pointer}
a:hover span,a:active span{position:absolute; top:90px; z-index:20px; visibility: visible; margin-left:-500px;}
#info img{ width:400px; height:280px; border:7px solid #FFFFFF}
#zs{ height:340px; overflow: auto; width:140px; float:right; margin-top:20px; margin-bottom:50px;}
.z{ width:80px; height:56px;display:block; border:1px solid #FFFFFF; margin:4px 0 4px 25px;color:#FFF}
.b1{ background:url(/articleimg/2006/07/3784/b1.jpg)}
.b2{ background:url(/articleimg/2006/07/3784/b2.jpg)}
.b3{ background:url(/articleimg/2006/07/3784/b3.jpg)}
.b4{ background:url(/articleimg/2006/07/3784/b4.jpg)}
.b5{ background:url(/articleimg/2006/07/3784/b5.jpg)}
.b6{ background:url(/articleimg/2006/07/3784/b6.jpg)}
/style
CODE:
div
h3子鼠的CSS相册/h3
div
ul
lia href="http://www.blueidea.com" target="_blank" title="照片1"spanimg src="/articleimg/2006/07/3784/a1.jpg" alt="照片1" /br /
这是照片1br /
www.blueidea.com/span/a/li
lia href="http://www.blueidea.com" target="_blank" title="照片2"spanimg src="/articleimg/2006/07/3784/a2.jpg" alt="照片2" /br /
这是照片2br /
www.blueidea.com/span/a/li
lia href="http://www.blueidea.com" target="_blank" title="照片3"spanimg src="/articleimg/2006/07/3784/a3.jpg" alt="照片3" /br /
这是照片3br /
www.blueidea.com/span/a/li
lia href="http://www.blueidea.com" target="_blank" title="照片4"spanimg src="/articleimg/2006/07/3784/a4.jpg" alt="照片4" /br /
这是照片4br /
www.blueidea.com/span/a/li
lia href="http://www.blueidea.com" target="_blank" title="照片5"spanimg src="/articleimg/2006/07/3784/a5.jpg" alt="照片5" /br /
这是照片5br /
www.blueidea.com/span/a/li
lia href="http://www.blueidea.com" target="_blank" title="照片6"spanimg src="/articleimg/2006/07/3784/a6.jpg" alt="照片6" /br /
这是照片6br /
www.blueidea.com/span/a/li
lia href="http://www.blueidea.com" target="_blank" title="照片1"spanimg src="/articleimg/2006/07/3784/a1.jpg" alt="照片1" /br /
这是照片1br /
www.blueidea.com/span/a/li
lia href="http://www.blueidea.com" target="_blank" title="照片2"spanimg src="/articleimg/2006/07/3784/a2.jpg" alt="照片2" /br /
这是照片2br /
www.blueidea.com/span/a/li
/ul
/div
/div
来源:http://www.tulaoshi.com/n/20160219/1603254.html
看过《DIV+CSS相册制作教程》的人还看了以下文章 更多>>