body主体就写四个li
- 第一个
- 第二个
- 第三个
- 第四次
</ul> </div> 在css样式里面写入 *{ padding: 0px; margin: 0px; } div ul{ display: flex; flex-flow: row ; list-style: none; } li{ height: 200px; line-height: 200px; border-radius: 20px; margin: 50px; border-radius: 20px; } .demo{ background: blue; } .demo:hover{ transform: scale(1.5,1.5) rotate(360deg); transition: all 3s ease 0.1s; border-radius: 20px; } .dem1{ background:blueviolet; } .dem1:hover{ transform: scale(1.5,1.5) rotate(360deg);/*这里是关于缩放和旋转的方向*/ transition: all 3s ease 0.1s;/* 这里是过渡的写法*/ border-radius: 20px; } .dem2{ background:greenyellow; } .dem2:hover{ transform: scale(1.5,1.5) rotate(360deg); transition: all 3s ease 0.1s; border-radius: 20px; } .dem3{ background:green; } .dem3:hover{ transform: scale(1.5,1.5) rotate(360deg); transition: all 3s ease 0.1s; border-radius: 20px; }