好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

CSS太阳月亮地球三角恋旋转效果_html/css_WEB-ITnose

纯粹玩一下,好像没有什么实际的卵用,but,纯玩买不了上当,纯玩买不了受骗。。。。。。。。

地月旋转的一个css效果,无聊玩玩,可以复制到记事本试试





CSS地心旋转效果
  
  .box

  {
  transform: scale(0.5);
  position: relative;
  padding: 1px;
  height: 300px;
  width: 300px;
  margin:100px auto;
  }
.sunline

  {
  position:relative;
  height: 400px;
  width: 400px;
  border: 2px solid black;
  border-radius: 50%;  
  margin: 50px 0 0 50px;
  display: flex;
  animation: rotate 10s infinite linear;
  }
.sun

  {
  height: 100px;
  width: 100px;
  margin: auto;
  background-color: red;
  border-radius: 50%;

  }
.earthline

  {
  position: absolute;
  right: 0;
  top: 50%;
  height: 200px;
  width: 200px;
  margin: -100px -100px 0 0;
  border: 1px solid black;
  border-radius: 50%;
  display: flex;
  animation: rotate 2s infinite linear;
  }
.earth

  {
  margin: auto;
  height: 50px;
  width: 50px;
  background-color: green;
  border-radius: 50%;
  }
.moon

  {
  position: absolute;
  left: 0;
  top: 50%;
  height: 20px;
  width: 20px;
  margin: -10px 0 0 -10px;
  background-color: gray;
  border-radius: 50%;
  }
@keyframes rotate

  {
  100%{transform:rotate(360deg);  

  }
}


 
  
  


  


  

查看更多关于CSS太阳月亮地球三角恋旋转效果_html/css_WEB-ITnose的详细内容...

  阅读:26次