|
前端采用Layui流加载模块,就一个单页。自动更新,无需打理。拿来引流是最好的。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>情侣头像网</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="情侣头像网">
<meta name="keywords" content="情侣头像网">
<link rel="stylesheet" type="text/css" />
<script src="https://www.layuicdn.com/layui/layui.js"></script>
<style>
body,html{height:100%;}
body{background-color:#f2f2f2;color:#666;font-weight:400;font-size:16px;font-familyoppins,sans-serif;}
*{margin:0;padding:0;}
*,::after,::before{box-sizing:border-box;}
li,ul{list-style:none;}
img{max-width:100%;border:0;}
.container{margin:0 auto;width:100%;max-width:100%;}
.header{width:100%;height:45px;border:1px solid #e6e6e6;background-color:#f5f5f5;text-align:center;line-height:45px;border-top-width:1px;}
.header h3{font-weight:400;}
#content{overflow:hidden;background-color:#fff;}
#content #list{display:inline-flex;padding:5px;width:25%;}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h3>精选头像</h3>
</div>
<div id="content"></div>
</div>
<script>
layui.use('flow', function(){
var $ = layui.jquery;
var flow = layui.flow;
flow.load({
elem: '#content',
isLazyimg: true,
done: function(page, next){
var lis = [];
$.get('http://data.umapi.top/other/couple.php?pg='+page, function(res){
layui.each(res.data, function(index, item){
lis.push('<div id="list"><img lay-src="'+ item.url +'"></div>');
});
next(lis.join(''), page < 41);
});
}
});
});
</script>
</body>
</html>
复制代码
忘了说要加上这个。。<meta name="referrer" content="no-referrer">
|
|