用CSS做滑动效果的图片画廊

<style>
#galleryh {
padding:0;
margin:0 auto 5em auto;
list-style-type:none;
overflow:hidden;
width:495px;
height:240px;
border:1px solid #888;
background:#fff url(/imagelist/06/24/o9642o826u4n.gif);
}
#galleryh li {
float:left;
}
#galleryh li a {
display:block;
height:240px;
width:28px;
float:left;
text-decoration:none;
border-right:1px solid #fff;
cursor:default;
}
#galleryh li a img {
width:28px;
height:240px;
border:0;
}
#galleryh li a:hover {
background:#eee;
width:320px;
}
#galleryh li a:hover img {
width:320px;
}
</style>

以下是引用片段:
<ul id=”galleryh”>
<li><a href=”#nogo”>
<img src=”/imagelist/06/24/433movw9ni5t.jpg” alt=”#1″ title=”#1″ /></a></li>
<li><a href=”#nogo”>
<img src=”/imagelist/06/24/5j2s3486qur7.jpg” alt=”#2″ title=”#2″ /></a></li>
<li><a href=”#nogo”>
<img src=”/imagelist/06/24/6g5c95l21jr0.jpg” alt=”#3″ title=”#3″ /></a></li>
<li><a href=”#nogo”>
<img src=”/imagelist/06/24/vt3bd2g7qyqk.jpg” alt=”#4″ title=”#4″ /></a></li>
<li><a href=”#nogo”>
<img src=”/imagelist/06/24/90850kbw77is.jpg” alt=”#5″ title=”#5″ /></a></li>
<li><a href=”#nogo”>
<img src=”/imagelist/06/24/7a3sv6r1j4ak.jpg” alt=”#6″ title=”#6″ /></a></li>
<li><a href=”#nogo”>
<img src=”/imagelist/06/24/7ej8grn86b3u.jpg” alt=”#7″ title=”#7″ /></a></li>
</ul>

相关文章:

1、CSS样式编写的规范和常见问题
https://www.onexin.net/css-styles-to-prepare-specifications-and-frequently-asked-questions/

2、最优秀的css样式reset.css
https://www.onexin.net/the-best-css-style-reset/

3、经典DIV + CSS Layout
https://www.onexin.net/classic-div-css-layout/

4、DIV+CSS布局解决IE6、IE7、IE8样式不兼容问题
https://www.onexin.net/divcss-layout-solution-ie6-ie7-ie8-style-incompatibility-issues/

5、CSS如何让图片垂直并水平居中等比缩放?
https://www.onexin.net/div-css-how-to-make-image-vertical-and-align-center-geometric-scaling/

转载请注明出处:https://www.onexin.net/picture-gallery-of-the-sliding-effect-with-css/

Leave a Reply

Your email address will not be published. Required fields are marked *