css实现不同季节的温度计温度指示动画切换效果代码

代码语言:html

所属分类:其他

代码描述:css实现不同季节的温度计温度指示动画切换效果代码,点击不同的天气图标切换不同的温度。

代码标签: 效果代码

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

<!DOCTYPE html>

<html lang="en">

<head>

   
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.0.css">


   
<style>
        html {
                width: 100vw;
                height: 100vh;
        }
       
        h1 {
                font-size: 22px;
                font-family: sans-serif;
                text-align: center;
                margin-bottom: 5px;
        }
       
        .thermometer {
                width: 200px;
                margin: 0 auto;
                position: relative;
        }
       
        .thermometer-base,
        .thermometer-body {
                background-color: #ededfa;
                border: 15px solid #d8d9e8;
                margin: 0 auto;
        }
       
        .thermometer-base,
        .thermometer-base-fill {
                margin: 0 auto;
                border-radius: 50%;
                z-index: 0;
        }
       
        .thermometer-base {
                height: 120px;
                width: 120px;
        }
       
        .thermometer-base::before {
                content: "";
                background-color: #db1d1d;
                height: 15px;
                width: 40px;
                position: absolute;
                left: 80px;
                z-index: 1;
        }
       
        .thermometer-base-fill {
                background-color: #db1d1d;
                height: 98px;
                width: 98px;
                position: relative;
                top: 11px;
                transition: top 0.5s cubic-bezier(0.33, 1, 0.68, 1);
        }
       
        .thermometer-body,
        .thermometer-body-fill {
                margin: 0 auto;
                border-radius: 50px 50px 0 0;
                z-index: 1;
        }
       
        .thermometer-body {
                height: 325px;
                width: 60px;
                border-bottom: 0;
                position: relative;
                bottom: -23px;
                overflow: hidden;
        }
       
        .thermometer-body-fill {
                background-color: #db1d1d;
                height: 320px;
                width: 40px;
                position: relative;
                top: 160px; /* lowest value is 11px - highest value is 300px */
                transition: top 0.5s linear;
        }
       
        .controls {
                text-align: center;
                position: absolute;
        .........完整代码请登录后点击上方下载按钮下载查看

网友评论0