美文网首页
css一段旋转效果代码

css一段旋转效果代码

作者: nickNic | 来源:发表于2019-08-02 16:41 被阅读0次
屏幕快照 2019-08-02 下午4.36.27.png 屏幕快照 2019-08-02 下午4.36.34.png
 <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>



  <style>
*{
  padding: 0px;
  margin: 0px;

}


ul{
  margin-top: 200px;
  text-align: center;
  background: red;
  height: 500px;
  text-align: center;
}

li{

  width: 100px;
  height: 200px;
  display: inline-block;
  line-height: 200px;
  margin-top: 150px;
  transition: transform 0.8s;
  position: relative;
}

ul li:nth-child(1){
  transform: rotateZ(30deg);
  background-color: yellow;

}
ul li:nth-child(2){
  transform: rotateZ(-30deg);
  background-color: green;

}
ul li:nth-child(3){
  transform: rotateZ(10deg);
  background-color: gold;

}
ul li:nth-child(4){
  transform: rotateZ(40deg);
  background-color: blue;

}


ul li:hover{
  transform: scale(2.0,2.0);
  z-index: 100;

}


  </style>
</head>
<body>

<ul>
  <li>1</li>
  <li>2</li>
  <li>3</li>
  <li>4</li>

</ul>


</body>
</html>

相关文章

网友评论

      本文标题:css一段旋转效果代码

      本文链接:https://www.haomeiwen.com/subject/nseldctx.html