<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
html, body{margin: 0; padding: 0;}
.box{margin: 0 auto; width: 400px; transform: rotate(-45deg);}
span{display: inline-block; width: 50px; height: 50px; margin: 0 1px 2px 0; background-color: lightblue; transition: 1s;}
span:hover{transform: scale(3); background-color: red;}
</style>
</head>
<body>
<div class="box">
<div>
<span></span>
</div>
<div>
<span></span>
<span></span>
</div>
<div>
<span></span>
<span></span>
<span></span>
</div>
<div>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<div>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
</body>
</html>
代码实现的是不规则排列和鼠标滑过放大,至于点击出现左右箭头切换就要用到JS了
追问感谢感谢,能否给出一个带左右箭头切换的带js的源码?
追答附件为简易版例子,请参考