<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<style>
* {
position: relative;
/* margin:0px;
padding: 0px; */
}
img {
display: block;
width: 220px;
}
#box {
margin: 0px auto;
}
.item {
box-shadow: 2px 2px 2px #999999;
/*设置为绝对定位,js通过top,left固定每个图片的位置*/
position: absolute;
}
</style>
<body>
<div id="box">
<img class="item" src="./images/3
用JS简单实现图片瀑布流 + 无限瀑布流效果
最新推荐文章于 2024-05-06 16:51:36 发布