纯css布局实现一辆跑车效果

代码语言:html

所属分类:布局界面

代码描述:纯css布局实现一辆跑车效果

代码标签: 实现 一辆 跑车 效果

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


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #002233;
  margin: 0;
  overflow: hidden;
}

:root {
  --car-height: 10vh;
  --gradient-size: 40px;
  --shine-width: calc(var(--gradient-size) + 5px);
  --shine-height: 80%;
  --color: #8c0000;
  --color2: rgba(221,221,221,1);
  animation: shine 0.5s linear infinite;
}

ul {
  list-style-type: none;
}

#car-container {
  height: calc(var(--car-height) * 3);
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

#center-lines-container {
  width: calc(var(--car-height) * 6);
  height: 1%;
  position: absolute;
  left: calc(var(--car-height) * -2.2);
  top: 50%;
  display: flex;
  justify-content: space-between;
  z-index: 5;
  padding: 0;
}

.center-line {
  height: 100%;
  b.........完整代码请登录后点击上方下载按钮下载查看

网友评论0