js+css实现带有颜色预警进度变化的数字增减器代码

代码语言:html

所属分类:其他

代码描述:js+css实现带有颜色预警进度变化的数字增减器代码,绿色为安全,红色为危险预警。

代码标签: js css 颜色 预警 进度 变化 数字 增减器 代码

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

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

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

  
  
<style>
@import url('https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,800,900wght&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #222;
}

.box {
    position:absolute;
    width: 80px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #333;
    border-radius: 50px;
    box-shadow: 0 5px 50px rgba(0, 0, 0, 0.5);
}

.spinner {
    position: relative;
    width: 40px;
    gap: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    user-select: none;
}

.progress {
    position: relative;
    width: 10px;
    background: #222;
    height: 300px;
    border-radius: 20px;
    display: flex;
    flex-direction: column-reverse;
}

.progress #meter {
    position: absolute;
    width: 100%;
    background: #0f0;
    border-radius: 20px;
    filter: drop-shadow(0 0 2.5px #0f0) drop-shadow(0 0 10px #0f0);
    transition: 0.5s;
}

.btn {
    position: relative;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    background: #444;
    font-size: 1.5em;
    color: #fff;
    border-radius: 50%;
    text-shadow: 0 0 5px #fff, 0 0 10px #fff;
    cursor: pointer;
    fo.........完整代码请登录后点击上方下载按钮下载查看

网友评论0