这篇文章将为大家详细讲解有关使用jQuery实现查看朋友圈图片,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

index.html 文件
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
<title>jQuery模仿朋友圈查看图片效果</title>
<link rel="stylesheet" type="text/css" href="css/css.css" >
<link rel="stylesheet" type="text/css" href="touchTouch/touchTouch.css" >
<script src="js/jquery-3.4.1.js"></script>
<script src="js/touchTouch.jquery.js"></script>
<script>
$(function() {
//图片事件 img-gather处为图片效果展示
$('#thumbs a').touchTouch();
});
</script>
</head>
<body>
<!--content-->
<div class="content">
<!--img-gather-->
<div class="clearfix img-gather" id="thumbs">
<a href="images/img1-large.png" title="图片一"></a>
<a href="images/img2-large.jpg" title="图片二"></a>
<a href="images/img1-large.png" title="图片一"></a>
<a href="images/img2-large.jpg" title="图片二"></a>
<a href="images/img1-large.png" title="图片一"></a>
<a href="images/img2-large.jpg" title="图片二"></a>
</div>
<!--img-gather end-->
</div>
</body>
</html>