油量计指示切换动画效果

代码语言:html

所属分类:布局界面

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


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



<style>
@import url("https://fonts.googleapis.com/css?family=IBM+Plex+Sans:400,700&display=swap");
* {
  padding: 0px;
  margin: 0px;
  box-sizing: border-box;
}

body {
  background-color: #171717;
  font-family: "IBM Plex Sans", sans-serif;
}

.label {
  cursor: pointer;
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
}
.label #indicator-check {
  display: none;
}
.label #indicator-check:checked + div {
  margin-left: 100px;
}
.label:hover .toggle-container {
  box-shadow: 0px 0px 15px -3px rgba(200, 200, 200, 0.6), inset 0px 0px 18px 5px rgba(0, 0, 0, 0.75);
}
.label .text {
  text-align: center;
  margin-top: 10px;
  color: #7d7d7d;
}
.label .text p {
  font-size: 14px;
}

.toggle-container {
  width: 260px;
  height: 120px;
  box-shadow: 0px 0px 27px -3px rgba(0, 0, 0, 0.75), inset 0px 0px 18px 5px rgba(0, 0, 0, 0.75);
  background-color: #fff;
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
          align-items: center;
  -webkit-box-pack: center;
          justify-content: center;
}
.toggle-container-inner {
  box-shadow: inset 0px 0px 70px 15px rgba(0, 0, 0, 0.5);
  background-color: #101010;
  width: 240px;
  height: 100px;
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
          align-items: center;
  -webkit-box-pack: center;
          justify-content: center;
  flex-wrap: wrap;
}
.toggle-container-inner-ticks {
  box-shadow: inset 0px 0px 20px 10px rgba(0, 0, 0, 0.75), inset 0px 25px 26px -26px rgba(236, 236, 236, 0.5);
  background-color: #080808;
  display: -webkit-box;
  display: flex;
  padding: 10px 30px;
  position: relative;
}
.toggle-container-inner-ticks-cover {
  position: absolute;
  display: -webkit-box;
  display: flex;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.05);
}
.toggle-container-inner-ticks-container {
  display: -webkit-box;
  display: flex;
}
.toggle-container-inner-ticks-container .tick {
  color: white;
  width: 10px;
}
.toggle-container-inner-ticks-container .tick::after {
  content: " ".........完整代码请登录后点击上方下载按钮下载查看

网友评论0