html设计(两种常见的充电效果)

news2024/9/22 23:29:35

第一种

完整代码:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
padding: 0;
margin: 0;
}
.box{
width: 800px;
height: 800px;
background-color: black;
margin: 20px auto;
padding-top: 20px;
position: relative;
}
.battery{
width: 200px;
height: 320px;
background-color:white;
margin-top: 200px;
margin-left: 300px;
border-radius: 15px 15px 0px 0px;
position: relative;
/* top: 20px; */
}
.battery::before{
content: "";
width: 50px;
height: 20px;
background-color:white;
position: absolute;
top: -20px;
left: 38%;
}
.battery::after{
content: "";
position: absolute;
top: 90%;
left: 0;
right: 0;
bottom: 0;
background-image: linear-gradient(to bottom,#7abcff 0%,#00BCD4
44%,#2196F3 100%);
animation:change 10s linear infinite ;
}
@keyframes change{
0%{
top: 100%;
filter: hue-rotate(90deg);
}
95%{
top: 5%;
border-radius: 0;
}
100%{
top: 0%;
border-radius: 15px 15px 0px 0px;
filter: hue-rotate(0deg);
}
}
.cover{
width: 100%;
height: 100%;
/* background-color: #00BCD4; */
border-radius: 15px 15px 0px 0px;
position: absolute;
top: 0;
left: 0;
z-index: 1;
overflow: hidden;
}
.cover::before{
content: "";
width: 400px;
height: 400px;
background-color: rgba(255, 255, 255, 0.8);
position: absolute;
left: -50%;
border-radius: 42% 40%;
animation: coverBefore 10s linear infinite;
}
@keyframes coverBefore{
0%{
transform: rotate(0deg);
bottom: 0%;
}
100%{
transform: rotate(360deg);
bottom: 100%;
}
}
.cover::after{
content: "";
width: 400px;
height: 400px;
background-color: rgba(255, 255, 255, 0.7);
position: absolute;
left: -50%;
border-radius: 42% 40%;
animation: coverAfter 10s linear infinite;
}
@keyframes coverAfter{
0%{
transform: rotate(30deg);
bottom: 2%;
}
100%{
transform: rotate(360deg);
bottom: 95%;
}
}
    </style>
</head>
<body>
    <div class="box">
    <div class="battery">
    <div class="cover"></div>
</body>
</html>

第二种

完整代码:

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>充电效果</title>

<style>

*{

padding: 0;

margin: 0;

}

/* .box{

width: 1000px;

height:1000px;

background-color: black;

margin: 20px auto;

padding-top: 20px;

position: relative;

} */

.contrast{

width: 70%;

height: 70%;

background-color:black;

position: absolute;

top: 20px;

left: 20%;

filter: contrast(15);

animation: hueRotate 5s linear infinite;

}

@keyframes hueRotate{

0%{

filter: contrast(15) hue-rotate(0);

}

100%{

filter: contrast(15) hue-rotate(360deg);

}

}

.circle{

width: 300px;

height: 300px;

/* background-color: #2196F3; */

position: absolute;

top: 0;

left: 50%;

margin-left: -150px;

filter: blur(8px);

animation: circleRotate 5s linear infinite;

}

@keyframes circleRotate{

0%{

transform: rotate(0);

}

100%{

transform: rotate(360deg);

}

}

.circle::before{

content: "";

width: 200px;

height: 200px;

background-color: #00ff6f;

position: absolute;

top: 50%;

left: 50%;

border-radius: 42% 38% 64% 49%/45%;

transform: translate(-50%,-50%);

}

.circle::after{

content: "";

width: 180px;

height: 178px;

background-color: black;

position: absolute;

top: 50%;

left: 50%;

border-radius: 50%;

transform: translate(-50%,-50%);

}

.number{

width: 200px;

height: 200px;

color: white;

font-size: 30px;

position: absolute;

top: 9%;

left: 55%;

z-index: 1;

line-height: 200px;

text-align: center;

margin-left: -100px;

}

.bubble_home{

width: 150px;

height: 50px;

background-color: #00ff6f;

position: absolute;

bottom: 0;

left: 45%;

border-radius: 150px 150px 15px 15px;

filter: blur(8px);

}

.bubble{

/* width: 20px;

height: 20px;

background-color:#00ff6f;

border-radius: 100%; */

position: absolute;

left: 50%;

bottom: 0;

z-index: 1;

animation:bubbleMoveUp 5s ease-in-out infinite ;

}

@keyframes bubbleMoveUp{

0%{

bottom: 0;

}

100%{

bottom: calc(100% - 260px);

}

}

.bubble:nth-child(1){

width: 20px;

height: 20px;

background-color:#00ff6f;

border-radius: 100%;

animation-duration: 5s;

animation-delay: 1s;

left: 50%;

}

.bubble:nth-child(2){

width: 18px;

height: 18px;

background-color:#00ff6f;

border-radius: 100%;

animation-duration: 7s;

animation-delay: 3s;

left: 47%;

}

.bubble:nth-child(3){

width: 22px;

height: 22px;

background-color:#00ff6f;

border-radius: 100%;

animation-duration: 3s;

animation-delay: 0.5s;

left: 51%;

}

.bubble:nth-child(4){

width: 18px;

height: 18px;

background-color:#00ff6f;

border-radius: 100%;

animation-duration: 4s;

animation-delay: 0s;

left: 50%;

}

.bubble:nth-child(5){

width: 20px;

height: 18px;

background-color:#00ff6f;

border-radius: 100%;

animation-duration: 7.5s;

animation-delay: 3.6s;

left: 48%;

}

.bubble:nth-child(6){

width: 21px;

height: 21px;

background-color:#00ff6f;

border-radius: 100%;

animation-duration: 8s;

animation-delay: 1.5s;

left: 50%;

}



</style>

</head>

<body>

<div class="box">

</div>

<div class="number">95.3%</div>

<div class="contrast">

<div class="bubble"></div>

<div class="bubble"></div>

<div class="bubble"></div>

<div class="bubble"></div>

<div class="bubble"></div>

<div class="bubble"></div>

<div class="bubble"></div>

<div class="bubble"></div>

<div class="bubble"></div>

<div class="bubble"></div>

<div class="bubble"></div>

<div class="bubble"></div>

<div class="bubble"></div>

<div class="bubble"></div>

<span class="bubble_home"></span>

<div class="circle"></div>

</div>

</div>

</body>

</html>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1922687.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Kotlin Misk Web框架

Kotlin Misk Web框架 1 Misk 框架介绍2 Misk/SpringBoot 框架对比3 Misk 添加依赖/配置3.1 build.gradle.kts3.2 settings.gradle.kts3.3 gradle.properties 4 Misk 请求接口5 Misk 程序模块6 Misk 主服务类7 Misk 测试结果 1 Misk 框架介绍 Misk 是由 Square 公司开发的一个开…

FSD渐入佳境,视觉方案还在机器人中“打酱油”?

一边是技术圈顶流&#xff0c;一边在当前行业应用中没什么存在感。 优点缺点&#xff0c;两头拔尖 优点与缺点都突出的特点&#xff0c;让视觉方案一直伴随着争议&#xff0c;在近些年的行业应用上也一直透着“底气”不足。但随着在自动驾驶方面&#xff0c;纯视觉FSD开始表现…

【Linux】|开发工具介绍 | yum |vim | gcc/g++ | gdb | git

Linux开发工具详解 1. 引言&#x1f4a6;2. Linux软件包管理器&#xff1a;Yum什么是软件包安装和卸载软件rzsz工具 3. Linux编辑器&#xff1a;VimVim的基本概念Vim的基本操作Vim模式和命令集&#x1f433;Vim配置 4. Linux编译器&#xff1a;GCC/G编译过程详解编译器的自举函…

如何通过兔子和窝窝的故事理解“在机器人学习和研究中的获得成本与维护成本”(节选)

获得成本 掌握一门课程&#xff0c;以最为简单的学校成绩过60为例&#xff0c;需要按要求提交材料&#xff0c;包括作业、报告、实验和考试等&#xff0c;依据学分和考核要求的不同&#xff0c;需要对于花费时间和经历进行完成。 维护成本 考完了&#xff0c;如果被动学习那…

Django 删除单行数据

1&#xff0c;添加模型 from django.db import modelsclass Post(models.Model):title models.CharField(max_length200)content models.TextField()pub_date models.DateTimeField(date published)class Book(models.Model):title models.CharField(max_length100)author…

安防监控视频平台LntonCVS视频融合共享平台智慧消防实现远程集中视频监控方案

近年来&#xff0c;电力系统内变电站着火事件频发&#xff0c;这对消防安全管理提出了严峻挑战。我国消防安全基础设施不完善、管理机制不健全、应急处置能力不足及公众消防安全意识淡薄等问题&#xff0c;严重制约了消防安全的提升。因此&#xff0c;加强变电站的消防安全管理…

Python应用爬虫下载QQ音乐歌曲!

目录&#xff1a; 1.简介怎样实现下载QQ音乐的过程&#xff1b; 2.代码 1.下载QQ音乐的过程 首先我们先来到QQ音乐的官网&#xff1a; https://y.qq.com/&#xff0c;在搜索栏上输入一首歌曲的名称&#xff1b; 如我在上输入最美的期待&#xff0c;按回车来到这个画面 我们首…

nx上darknet的使用-目标检测-在python中的使用

1 内置的代码 在darknet中已经内置了两个py文件 darknet_video.py与darknet_images.py用法类似&#xff0c;都是改一改给的参数就行了&#xff0c;我们说一下几个关键的参数 input 要预测哪张图像weights 要使用哪个权重config_file 要使用哪个cfg文件data_file 要使用哪个da…

240712_昇思学习打卡-Day24-LSTM+CRF序列标注(3)

240712_昇思学习打卡-Day24-LSTMCRF序列标注&#xff08;3&#xff09; 今天做LSTMCRF序列标注第三部分&#xff0c;同样&#xff0c;仅作简单记录及注释&#xff0c;最近确实太忙了。 Viterbi算法 在完成前向训练部分后&#xff0c;需要实现解码部分。这里我们选择适合求解…

Android Gantt View 安卓实现项目甘特图

需要做一个项目管理工具&#xff0c;其中使用到了甘特图。发现全网甘特图解决方案比较少&#xff0c;于是自动动手丰衣足食。 前面我用 Python和 Node.js 前端都做过&#xff0c;这次仅仅是移植到 Android上面。 其实甘特图非常简单&#xff0c;开发也不难&#xff0c;如果我…

PCL从理解到应用【04】Octree 原理分析 | 案例分析 | 代码实现

前言 Octree 作为一种高效的空间分割数据结构&#xff0c;具有重要的应用价值。 本文将深入分析 Octree 的原理&#xff0c;通过多个实际案例帮助读者全面理解其功能和应用&#xff0c;包括最近邻搜索、半径搜索、盒子搜索以及点云压缩&#xff08;体素化&#xff09;。 特性…

MongoDB - 查询操作符:比较查询、逻辑查询、元素查询、数组查询

文章目录 1. 构造数据2. MongoDB 比较查询操作符1. $eq 等于1.1 等于指定值1.2 嵌入式文档中的字段等于某个值1.3 数组元素等于某个值1.4 数组元素等于数组值 2. $ne 不等于3. $gt 大于3.1 匹配文档字段3.2 根据嵌入式文档字段执行更新 4. $gte 大于等于5. $lt 小于6. $lte 小于…

(Vue+SpringBoot+elementUi+WangEditer)仿论坛项目

项目使用到的技术与库 1.前端 Vue2 elementUi Cookie WangEditer 2.后端 SpringBoot Mybatis-Plus 3.数据库 MySql 一、效果展示 1.1主页效果&#xff1a; 1.2 文章编辑页面&#xff1a; 1.3 成功发布文章 1.4 文章关键字搜索提示 1.5 文章查询结果展示 1.6 文章内容及交互展示…

统信UOS服务器操作系统离线安装postgresql数据库

原文链接&#xff1a;统信UOS服务器离线安装postgresql数据库 Hello&#xff0c;大家好啊&#xff01;今天给大家带来一篇关于在统信UOS服务器操作系统上离线安装PostgreSQL数据库的文章。PostgreSQL是一款功能强大的开源对象-关系型数据库管理系统。由于某些环境中无法直接访问…

免费开源的工业物联网(IoT)解决方案

什么是 IoT&#xff1f; 物联网 (IoT) 是指由实体设备、车辆、电器和其他实体对象组成的网络&#xff0c;这些实体对象内嵌传感器、软件和网络连接&#xff0c;可以收集和共享数据。 IoT 设备&#xff08;也称为“智能对象”&#xff09;范围广泛&#xff0c;包括智能恒温器等…

SpringBoot+Vue(2)excel后台管理页面

一、需求 SpringBootVue写excel后台管理页面&#xff08;二级页面打开展示每一个excel表&#xff0c;数据库存储字段为“下载、删除、文件详情、是否共享、共享详情”&#xff09; 二、解答 后端(Spring Boot) 1. 项目设置 使用Spring Initializr创建一个新的Spring Boot项目…

深入理解 Elasticsearch 分页技术

原文链接&#xff1a;https://zhuanlan.zhihu.com/p/609576187 Elasticsearch 是一款分布式的搜索引擎&#xff0c;提供了灵活的分页技术。本文主要介绍 Elasticsearch&#xff08;简称 ES&#xff09; 的几种分页技术&#xff0c;并深入分析各种分页技术的优缺点及应用场景。 …

基于AT89C51单片机篮球计时计分器的设计(含文档、源码与proteus仿真,以及系统详细介绍)

本篇文章论述的是基于AT89C51单片机篮球计时计分器的设计的详情介绍&#xff0c;如果对您有帮助的话&#xff0c;还请关注一下哦&#xff0c;如果有资源方面的需要可以联系我。 目录 绪论 原理图 ​编辑 仿真图 系统总体设计图 代码实现 系统论文 资源下载 绪论 本次…

内网服务器通过squid代理访问外网

一、背景 现在要对172.16.58.158服务器进行openssh升级操作,我用之前写好的升级脚本执行后,发现没有备份旧的ssh程序文件,然后还卸载了oenssl-devel,然后我发现其他服务器ssh该服务器失败。同时脚本执行时报错“ configure: error: *** zlib.h missing - please install first …

windows查看局域网所有设备ip

windows如何查看局域网所有设备ip 操作方法 一 . 在搜索栏里输入cmd 二 .在命令行黑窗口输入arp -a 三 . 最上面显示的动态地址就是所有设备ip