图片廊

编程入门 行业动态 更新时间:2024-10-27 04:30:20

<a href=https://www.elefans.com/category/jswz/34/1770705.html style=图片廊"/>

图片廊

html:

        <div class="photo-box"><div class="photo"><img src="../images/index_list/7.png" alt=""><span>图片1</span></div><div class="photo"><img src="../images/index_list/6.png" alt=""><span>图片2</span></div><div class="photo"><img src="../images/index_list/8.png" alt=""><span>图片3</span></div><div class="photo"><img src="../images/index_list/9.png" alt=""><span>图片4</span></div></div>

css:

/* 图片廊 */

.photo-box {width: 95%;display: flex;justify-content: space-between;align-items: flex-start;flex-wrap: wrap;margin: 0 auto;box-sizing: border-box;
}.photo {width: 45%;height: 25%;display: flex;align-items: flex-start;flex-wrap: wrap;box-sizing: border-box;margin-top: 2rem;
}.photo img {width: 100%;height: 20%;
}.photo span {width: 100%;display: flex;align-items: center;justify-content: center;padding: 0.5rem 0;font-family: SourceHanSansCN-Medium;font-size: 0.9rem;box-shadow: 0rem 0.2rem 0.2rem 0rem rgba(81, 81, 81, 0.19);font-weight: normal;
}

代码效果:

更多推荐

图片廊

本文发布于:2024-02-27 16:46:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1707422.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图片

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!