css实现宇宙星空运转效果代码

代码语言:html

所属分类:动画

代码描述:css实现宇宙星空运转效果代码

代码标签: 星空 运转 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">

  
  
  
<style>
*{
  border-radius: 100px;
}
body{
    font-size:30px;
  color: white
}

#ibandoc{
  color: white;
}

html {
  height: 100%;
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
  overflow: hidden;
}

.container {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    height: 100vh;
}

.night li
{
	position: absolute;
	list-style: none;
	width: 5px;
	height: 5px;
	border-radius: 100%;
	background-color:#fff;
	transform: rotate(45deg);
}

.night li:nth-child(1) {
  width: 16px;
	height: 16px;
	top:80%;
  left:25%;
  background-color: grey;
}

.night li:nth-child(2)
{
  top:40%;
  left:40%;
}

.night li:nth-child(3) {
  opacity: 0;
  top:20%;
  left:45%;
  width:5px;
  height: 37px;
  animation: meteor 1.5s infinite linear;
  animation-delay: 1s;

}

.night li:nth-child(4)
{
  top:5%;
  left:50%;
}

.night li:nth-child(5)
{
  opacity: 0;
  top:20%;
  left:55%;
  width:1px;
  height: 15px;
  animation: meteor 1.5s infinite linear;
}

@keyframes meteor
{

10%
{
  opacity: 2;
}
80%	
{
  left: 5%;
  top:  85%;
  opacity: 0;
}
}
.planet {
    width: 285px;
    height: 285px;
    background-image: url("//repo.bfw.wiki/bfwrepo/image/60593e2010464.png");
);
    border-radius: 50%;
    background-size: cover;
 .........完整代码请登录后点击上方下载按钮下载查看

网友评论0