Html代码:
CSS代码:
.group-img { width: 423px; height: 480px; position: relative; } .group-img a { position: absolute; display: block; text-decoration: none; color: #000; border: 1px solid transparent; } .group-img a .outer { display: block; border: 1px solid transparent; } .group-img a .inner { display: block; width: 100px; height: 80px; border: 1px solid transparent; margin: 3px; } .group-img a .note { position: absolute; top: 100px; left: -9999px; background: #BDBDBD; width: 106px; padding: 5px; text-align: center; color: #fff; } .group-img .li a { top: 100px; left: 120px; } .group-img .yao a { top: 8px; left: 260px; } .group-img a:hover, .group-img a:focus { border: 1px solid #d4d82d; } .group-img a:hover .outer, .group-img a:focus .outer { border: 1px solid #00FF7F; } .group-img a:hover .inner, .group-img a:focus .inner { border: 1px solid #00CED1; } .group-img a:hover .note, .group-img a:focus .note { left: 0px; }
CSS布局需要注意两点将容器的大小和图片的大小保持一致,不显示的文字通过left隐藏文字,鼠标滑动的时候回归正常~
声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com