首页 > Web开发 > 详细

CSS 图片廊:使用 CSS3 的媒体查询来创建响应式图片廊

时间:2020-04-09 10:51:35      阅读:80      评论:0      收藏:0      [点我收藏+]

CSS 图片廊

以下是使用CSS创建图片廊:

技术分享图片
这里添加图片文本描述
技术分享图片
这里添加图片文本描述
技术分享图片
这里添加图片文本描述
技术分享图片
这里添加图片文本描述

 

图片廊

以下是使用 CSS 创建图片廊:

实例

<divclass="responsive"><divclass="img"><atarget="_blank"href="http://static.runoob.com/images/demo/demo1.jpg"><imgsrc="http://static.runoob.com/images/demo/demo1.jpg"alt="图片文本描述"width="300"height="200"></a><divclass="desc">这里添加图片文本描述</div></div></div><divclass="responsive"><divclass="img"><atarget="_blank"href="http://static.runoob.com/images/demo/demo2.jpg"><imgsrc="http://static.runoob.com/images/demo/demo2.jpg"alt="图片文本描述"width="300"height="200"></a><divclass="desc">这里添加图片文本描述</div></div></div><divclass="responsive"><divclass="img"><atarget="_blank"href="http://static.runoob.com/images/demo/demo3.jpg"><imgsrc="http://static.runoob.com/images/demo/demo3.jpg"alt="图片文本描述"width="300"height="200"></a><divclass="desc">这里添加图片文本描述</div></div></div><divclass="responsive"><divclass="img"><atarget="_blank"href="http://static.runoob.com/images/demo/demo4.jpg"><imgsrc="http://static.runoob.com/images/demo/demo4.jpg"alt="图片文本描述"width="300"height="200"></a><divclass="desc">这里添加图片文本描述</div></div></div>


更多实例

响应式图片廊

使用 CSS3 的媒体查询来创建响应式图片廊:

<divclass="responsive"><divclass="img"><atarget="_blank"href="img_fjords.jpg"><imgsrc="http://www.runoob.com/wp-content/uploads/2016/04/img_fjords.jpg"alt="Trolltunga Norway"width="300"height="200"></a><divclass="desc">这里添加图片文本描述</div></div></div><divclass="responsive"><divclass="img"><atarget="_blank"href="img_forest.jpg"><imgsrc="http://www.runoob.com/wp-content/uploads/2016/04/img_forest.jpg"alt="Forest"width="600"height="400"></a><divclass="desc">这里添加图片文本描述</div></div></div><divclass="responsive"><divclass="img"><atarget="_blank"href="img_lights.jpg"><imgsrc="http://www.runoob.com/wp-content/uploads/2016/04/img_lights.jpg"alt="Northern Lights"width="600"height="400"></a><divclass="desc">这里添加图片文本描述</div></div></div><divclass="responsive"><divclass="img"><atarget="_blank"href="img_mountains.jpg"><imgsrc="http://www.runoob.com/wp-content/uploads/2016/04/img_mountains.jpg"alt="Mountains"width="600"height="400"></a><divclass="desc">这里添加图片文本描述</div></div></div><divclass="clearfix"></div><divstyle="padding:6px;"><h4>重置浏览器大小查看效果</h4></div>

CSS 图片廊:使用 CSS3 的媒体查询来创建响应式图片廊

原文:https://www.cnblogs.com/peijz/p/12664575.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!