js模拟地铁自转公转昼夜春夏秋冬四季循环效果代码

代码语言:html

所属分类:动画

代码描述:js模拟地铁自转公转昼夜春夏秋冬四季循环效果代码

代码标签: 地球 昼夜 春夏秋冬 四级 循环

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

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

<head>

  <meta charset="UTF-8">

  
  
  
<style>
body {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-family: "Times New Roman";
  font-weight: 100;
  font-style: italic;
  background: #222;
}

h1 {
  margin-top: 5vh;
  color: #fff;
  text-align: center;
  font-size: 32px;
  font-style: normal;
  font-weight: 100;
  letter-spacing: 2px;
}
h1 i {
  font-size: 14px;
  vertical-align: 35%;
}
h1 b {
  font-family: Helvetica;
}
h1 span {
  display: inline-block;
  border-bottom: 1px solid #fff8;
  height: 33px;
  padding: 0 6px;
}

.earth-container {
  position: relative;
  margin: 80px 0 120px calc(50% - 190px);
  height: 380px;
  background: linear-gradient(90deg, #222 190px, #0000 190px), linear-gradient(#0000 0, #111 0.5%, #111 98.5%, #0000 100%);
  cursor: pointer;
}
@keyframes rotate {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 950px 0;
  }
}
.earth-container .globe {
  position: absolute;
  width: 380px;
  height: 100%;
  border-radius: 100%;
  background: url("//repo.bfw.wiki/bfwrepo/icon/61b92e396c8b1.png") 0 0/250% 100%, #008;
  animation: rotate 40s infinite linear;
  transform: rotate(calc(-23.4deg * var(--ang)));
}
.earth-container .globe:before, .earth-container .globe:after {
  content: "";
  position: absolute;
  inset: 100% 50% -80px;
  width: 1px;
  border-left: 2px .........完整代码请登录后点击上方下载按钮下载查看

网友评论0