div+css实现全息死亡星球旋转动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现全息死亡星球旋转动画效果代码

代码标签: div css 全息 死亡 星球 旋转 动画

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

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

<head>
  <meta charset="UTF-8">
  

  
  
  
<style>
:root {
  --height: 300px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background-image: radial-gradient(circle, transparent calc(var(--height) * 1.05), #000d 100%), linear-gradient(#233c4b calc(50vh + var(--height) * 0.7) calc(50vh + var(--height) * 0.7), #202729 calc(50vh + var(--height) * 0.7) calc(53vh + var(--height) * 0.7), #000a 100vh);
}

.star-container {
  height: var(--height);
  width: var(--height);
  position: relative;
  border-radius: 50%;
  background-color: #4ce1ed;
  overflow: hidden;
  box-shadow: 0 0 calc(0.03 * var(--height)) #4ce1ed;
  opacity: 0.5;
  filter: brightness(1.3) saturate(3);
  -webkit-mask-image: repeating-linear-gradient(90deg, transparent, #000 4px), repeating-linear-gradient(90deg, transparent, #0004 2px);
          mask-image: repeating-linear-gradient(90deg, transparent, #000 4px), repeating-linear-gradient(90deg, transparent, #0004 2px);
  -webkit-animation: floating 3s linear infinite alternate;
          animation: floating 3s linear infinite alternate;
}
.star-container::after {
  content: "";
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  background-image: radial-gradient(circle at 70% 40%, #fff3 30%, transparent 50%, #0006 70%);
  box-shadow: inset calc(-0.03 * var(--height)) calc(-0.02 * var(--height)) calc(0.06 * var(--height)) #0009, inset 0 calc(-0.01 * var(--height)) 1px #fff6;
}
.star-container::before {
  content: "";
  height: 10%;
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  background: linear-gradient(#0000, #92f4fb44 30%, #8fcdd744 50%, #92f4fb44 70%, #0000 100%);
  box-shadow: 0 0 10px #0000;
  z-index: 3;
  -webkit-animation:.........完整代码请登录后点击上方下载按钮下载查看

网友评论0