以下是 html5仿微信朋友圈相册图片放大代码 的示例演示效果:
部分效果截图:
HTML代码(index.html):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>html5仿微信朋友圈相册图片放大代码</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no" name="format-detection" />
<meta name="description" content="">
<meta name="author" content="">
<meta name="renderer" content="webkit">
<link rel="stylesheet" href="http://cdn.amazeui.org/amazeui/2.5.0/css/amazeui.min.css" />
<style>
.middle-img {
position: absolute;
left: 259px;
top: 0px;
width: 40px;
}
.up-img {
position: absolute;
top: -40px;
left: 261px;
width: 40px;
}
.down-img {
position: absolute;
top: 40px;
left: 257px;
width: 40px;
}
.left-img {
position: absolute;
left: 218px;
width: 40px;
}
.right-img {
position: absolute;
left: 300px;
width: 40px;
}
@media screen and (max-width:450px) {
.middle-img {
position: absolute;
left: 259px;
top: 0px;
width: 40px;
display: none;
}
.up-img {
position: absolute;
top: -40px;
left: 261px;
width: 40px;
display: none;
}
.down-img {
position: absolute;
top: 40px;
left: 257px;
width: 40px;
display: none;
}
.left-img {
position: absolute;
left: 218px;
width: 40px;
display: none;
}
.right-img {
position: absolute;
left: 300px;
width: 40px;
display: none;
}
.rotate_jia{
display: none;
}.rotate_div{
display: none;
}.rotate_jian{
display: none;
}
}
</style>
</head>
<body>
<ul data-am-widget="gallery" class="am-gallery am-avg-sm-2
am-avg-md-3 am-avg-lg-4 am-gallery-overlay" data-am-gallery="{ pureview: true }" >
<li>
<div class="am-gallery-item">
<a href="images/1.jpg" class="">
<img src="images/1.jpg" alt="远方 有一个地方 那里种有我们的梦想"/>
<h3 class="am-gallery-title">远方 有一个地方 那里种有我们的梦想</h3>
<div class="am-gallery-desc">2375-09-26</div>
</a>
</div>
</li>
<li>
<div class="am-gallery-item">
<a href="images/2.jpg" class="">
<img src="images/2.jpg" alt="某天 也许会相遇 相遇在这个好地方"/>
<h3 class="am-gallery-title">某天 也许会相遇 相遇在这个好地方</h3>
<div class="am-gallery-desc">2375-09-26</div>
</a>
</div>
</li>
<li>
<div class="am-gallery-item">
<a href="images/3.jpg" class="">
<img src="images/3.jpg" alt="不要太担心 只因为我相信"/>
<h3 class="am-gallery-title">不要太担心 只因为我相信</h3>
<div class="am-gallery-desc">2375-09-26</div>
</a>
</div>
</li>
<li>
<div class="am-gallery-item">
<a href="images/4.jpg" class="">
<img src="images/4.jpg" alt="终会走过这条遥远的道路"/>
<h3 class="am-gallery-title">终会走过这条遥远的道路</h3>
<div class="am-gallery-desc">2375-09-26</div>
</a>
</div>
</li>
</ul>
<!--与代码无关可以删除-->
<br>
<br>
<div style="width: 80%;margin: 0 auto;font-weight:bold;">
<h3>图片画廊效果支持的功能</h3>
<p>1.布局自适应手机和PC端</p>
<p>2.PC支持左右切换图片,微信支持左右滑动切换图片</p>
<p>3.PC支持鼠标滚轮缩放图片,微信支持手指缩放</p>
<p>4.pc支持按ESC关闭窗口</p>
<p>5.支持上下左右移动图片</p>
</div>
<!--与代码无关可以删除-->
<script src="js/jquery.min.js"></script>
<script src="js/amazeui.js"></script>
</body>
</html>