css+js实现可调节速度的设备指示灯闪烁动画效果代码

代码语言:html

所属分类:动画

代码描述:css+js实现可调节速度的设备指示灯闪烁动画效果代码

代码标签: css js 调节 速度 设备 指示灯 闪烁 动画

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

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

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

  
  
<style>
body {
  margin: 0px;
  padding: 0px;
  background: #000000;
  display: flex;
  flex-direction: row;
  height: 100vh;
  align-items: center;
  justify-content: center;
}

svg {
  filter: contrast(120%) brightness(60%);
}

.car-bg {
  position: relative;
  justify-content: center;
}

.lights-container {
  position: absolute;
  top: 240px;
  left: 298px;
  width: 210px;
  height: 16px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-transform: rotate(0.8deg);
          transform: rotate(0.8deg);
  filter: contrast(120%);
}

.lights-container .led {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  min-width: 12px;
  background: #741313;
  background: radial-gradient(circle, rgba(120,33,33,0.6) 0%, rgba(63,9,9,1) 100%);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}

.lights-container .led-glow {
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, white 4%, rgba(255, 100, 10, 0.7) 10%, rgba(255 100, 100, 0) 100%);
  opacity: 0;
}

.slider-container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 400px;
  background-color: rgba(132, 132, 132, 0.291);
  padding: 0px 30px;
  border-radius: 10px;
  margin: 0px 0px 0px 120px;
  color: #a7a6a6;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

.slider-container .labels {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  width: 100%;
  margin-bottom: 20px;
}

.slider-container h1 {
  margin: 20px 0px;
}

.slider-container label {
  font-size: 20px;
  margin: 12px 0px;
}

.slider-container .slider {
  -webkit-appearance: none;
  width: 100%;
  height: 50px;
  background: #000000;
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  -webkit-transition: opacity .2s;
  transition: opacity .2s;
}

.slider-container .slider:hover {
  opacity: 1;
}

.slider-container .slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 50px;
  height: 50px;
  background: #5f5f5f;
  cursor: pointer;
}

.slider-container .slider::-moz-range-thumb {
  width: 50px;
  height: 50px;
  background: #5f5f5f;
  cursor: pointer;
}
</style>


  
  
</head>

<body translate="no">
  <div class="car-bg">
  <svg width='800' height='440' xmlns='http://www.w3.org/2000/svg' stroke='null'>
    <g stroke='null'>
      <title stroke='null'>Layer 1</title>
      <path id='svg_13' d='m241.62003,129.72863' opacity='NaN' fill='#000000' stroke='#fff'/>
      <path fill='#191919' stroke-width='3' opacity='NaN' d='m99.29241,378.64732c7.42857,14.85714 12.57143,18.28571 20.57143,23.42857c8,5.14286 18.28571,7.42857 33.71429,8c15.42857,0.57143 22.28571,-2.85714 28.57143,-6.28571c6.28571,-3.42857 10.28571,-12.57143 11.42857,-14.28571c1.14286,-1.71429 -101.71429,-25.71429 -94.28571,-10.85714l-0.00001,-0.00001z' id='svg_73' stroke='null'/>
      <path fill='#191919' stroke-width='3' opacity='NaN' d='m697.57812,396.93303c0,0 -1.14286,7.14293 -6.85714,15.42857c-5.71429,8.28564 -19.42857,10.85714 -19.86383,10.49554c0.43526,0.3616 -37.85061,2.36154 -44.13627,0.64728c-6.28566,-1.71426 -13.14276,0.85718 -21.14276,-11.14282c-8,-12 -8.57143,-18.28571 -9.00669,-18.64732c0.43526,0.3616 100.43526,-5.35268 100,-5.71429' id='svg_75' stroke='null'/>
      <path fill='#191919' stroke-width='3' opacity='NaN' d='m177.952,127.10553c2.00803,-0.40161 26.10442,-43.7751 41.36546,-58.23293c15.26104,-14.45783 25.42028,-31.31949 38.81456,-35.53926c13.39428,-4.21977 113.39428,-7.03102 138.69549,-7.03102c25.30121,0 135.74298,7.22892 148.59438,11.24498c12.85141,4.01606 44.57831,37.3494 48.59438,43.3735c4.01606,6.0241 32.93173,46.58635 32.93173,46.98795c0,0.40161 -28.51406,-4.81928 -28.65533,-5.01718c0.14128,0.1979 -14.31656,-29.52098 -23.95511,-38.75792c-9.63855,-9.23695 -31.3253,-30.12048 -34.13655,-32.12851c-2.81125,-2.00803 -8.83534,0.80321 -8.97662,0.60532c0.14127,0.1979 25.84409,34.33444 28.65533,41.16175c2.81125,6.82731 6.4257,22.08835 6.28443,21.89045c0.14127,0.1979 -29.5776,-1.00692 -29.5776,-1.40853c0,-0.40161 0.40161,-17.26908 -5.22088,-27.71084c-5.62249,-10.44177 -15.66265,-20.48193 -15.80392,-20.67983c0.14127,0.1979 -53.67399,-10.64548 -119.93905,-11.85029c-66.26506,-1.20482 -105.22089,8.43374 -105.36215,8.23584c0.14127,0.1979 -11.90693,10.63967 -13.91496,18.67179c-2.00803,8.03213 -12.85141,32.12851 -12.99267,31.93062c0.14127,0.1979 -27.97118,1.00111 -28.11245,0.80321c0.14127,0.1979 8.74268,-26.18185 18.38124,-37.82843c9.63855,-11.64659 19.91264,-26.2307 19.77137,-26.42859c0.14127,0.1979 3.28688,-0.37179 -4.81928,-1.20482c-8.10616,-0.83303 -23.97375,14.27896 -31.20267,25.92555c-7.22892,11.64659 -21.95065,34.51912 -28.63669,42.34754c-6.68604,7.82842 382.8722,11.44288 -30.78243,10.63967l-0.00001,-0.00002z' id='svg_78' stroke='null'/>
      <path fill='#333333' stroke-width='3' opacity='NaN' d='m201.57302,92.54079c0,0 -14.59607,23.01688 -14.62508,22.92267c0.029,0.09421 -29.16314,-1.02857 -29.19214,-1.12277c0.029,0.09421 -2.77793,-10.57215 8.44981,-16.74741c11.22775,-6.17526 20.20994,-5.61387 21.33272,-5.61387c1.12277,0 14.03468,0.56139 14.03468,0.56139l0.00001,-0.00001z' id='svg_79' stroke='null'/>
      <path fill='#333333' stroke-width='3' opacity='NaN' d='m607.24308,99.91552c0,0 14.23073,23.37549 14.25901,23.27981c-0.02828,0.09569 28.43317,-1.04459 28.46144,-1.14026c-0.02828,0.09567 2.7084,-10.73688 -8.23831,-17.00835c-10.94671,-6.27147 -19.70408,-5.70134 -20.79875,-5.70134c-1.09467,0 -13.68339,0.57014 -13.68339,0.57014z' id='svg_80' stroke='null'/>
      <g id='svg_26' stroke='null'>
        <g id='svg_24' strok.........完整代码请登录后点击上方下载按钮下载查看

网友评论0