html設計(兩種常見的充電效果)

第一種

完整代碼:

<!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.pswp.cn/web/44521.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/44521.shtml
英文地址,請注明出處:http://en.pswp.cn/web/44521.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

方便快捷傳文件—搭建rsync文件傳輸服務器

比如我們有一個服務器&#xff0c;想把各個機器的文件都通過腳本傳給這臺機&#xff0c;用sftp或者直接rsync就必須輸密碼&#xff0c;肯定不行&#xff0c;做等效性免密又麻煩&#xff0c;怎么辦呢&#xff0c;這么辦&#xff01; 在服務端 yum -y install rsync #編輯&…

Vue3 關于scss預編譯中:deep 其中的deep如何理解

在SCSS預處理器中&#xff0c;:deep是一個偽類選擇器&#xff0c;用于選擇一個元素的所有后代元素&#xff0c;無論它們在DOM結構中的層級深度如何。換句話說&#xff0c;:deep選擇器是一個類似于CSS中的后代選擇器&#xff0c;但是它可以不考慮嵌套層級的限制&#xff0c;而是…

Android MessageQueue 源碼分析

類注釋 /*** Low-level class holding the list of messages to be dispatched by a* {link Looper}. Messages are not added directly to a MessageQueue,* but rather through {link Handler} objects associated with the Looper.** <p>You can retrieve the Messa…

【FineGrip】全光學感知:一種新的通用遙感圖像解釋任務和細粒度數據集(IEEE TGRS 2024)

摘要 目前的遙感解譯模型通常集中于單一的任務&#xff0c;如檢測、分割或字幕。但是&#xff0c;針對特定任務設計的模型無法實現綜合多層次解譯。該領域也缺乏多任務聯合解譯數據集。本文提出Panoptic Perception&#xff0c;一個新的任務和一個新的細粒度數據集&#xff08…

apache Kylin系列介紹及配置

Apache Kylin是一個開源的分布式分析引擎,用于OLAP(聯機分析處理)數據處理。它專門設計用于處理大規模的數據集,并提供快速的查詢和分析能力。 apache Kylin架構: Apache Kylin是一個開源的分布式分析引擎,旨在提供高性能、低延遲的OLAP(聯機分析處理)能力。下面是Ap…

nvim工具介紹

1. **seoul256.vim**: 一個基于首爾色彩的低對比度 Vim 顏色方案&#xff0c;適用于 256 色終端或 GVim。 2. **vim-easy-align**: Vim 插件&#xff0c;用于對齊文本。 3. **vim-go**: Vim 的 Go 語言插件&#xff0c;支持語法高亮、自動縮進等。 4. **coc.nvim**: 集成了 LSP…

GESP CCF C++ 二級認證真題 2024年6月

第 1 題 小楊父母帶他到某培訓機構給他報名參加CCF組織的GESP認證考試的第1級&#xff0c;那他可以選擇的認證語言有幾種&#xff1f;&#xff08; &#xff09; A. 1 B. 2 C. 3 D. 4 第 2 題 下面流程圖在yr輸入2024時&#xff0c;可以判定yr代表閏年&#xff0c;并輸出 2月…

介紹一款數據準實時復制(CDC)中間件 `Debezium`

簡介 文章開頭先介紹一下什么是CDC。數據準實時復制(CDC)是目前行內實時數據需求大量使用的技術。常用的中間件有Canal、Debezium、Flink CDC等 下面我們做一下對比 各有優缺點吧,本主要介紹一下Debezium中間件。 Debezium是什么 Debezium是一個為變更數據捕獲(CDC)提供…

Windows圖形界面(GUI)-SDK-C/C++ - 列表框(List)

公開視頻 -> 鏈接點擊跳轉公開課程博客首頁 -> 鏈接點擊跳轉博客主頁 目錄 列表框(List) 控件樣式 創建控件 初始控件 消息處理 示例代碼 列表框(List) 控件樣式 列表框&#xff08;ListBox&#xff09;是Windows圖形界面開發中常用的控件&#xff0c;允許用戶從…

力扣第230題“二叉搜索樹中第K小的元素”

在本篇文章中&#xff0c;我們將詳細解讀力扣第230題“二叉搜索樹中第K小的元素”。通過學習本篇文章&#xff0c;讀者將掌握如何使用中序遍歷來找到二叉搜索樹中的第K小的元素&#xff0c;并了解相關的復雜度分析和模擬面試問答。每種方法都將配以詳細的解釋&#xff0c;以便于…

OpenAI終止對中國提供API服務,對國內AI市場產生重大沖擊?

6月25日&#xff0c;OpenAI突然宣布終止向包括中國在內的國家地區提供API服務&#xff0c;本月9日這一政策已經正式生效了&#xff01; 有人說&#xff0c;這個事件給中國AI行業帶來很大沖擊&#xff01;是這樣嗎&#xff1f;在展開討論前&#xff0c;我們先來看看什么是API服務…

會話固定攻擊

會話固定攻擊&#xff08;Session Fixation Attack&#xff09;是一種網絡攻擊&#xff0c;攻擊者試圖誘騙受害者使用攻擊者指定的會話ID&#xff0c;以便在受害者登錄后&#xff0c;攻擊者能夠竊取受害者的會話并冒充受害者進行操作。下面是一個形象的例子來解釋會話固定攻擊&…

8080端口映射外網不成功的原因

最近因為需要將群暉nas的8080端口映射到外網&#xff0c;但是路由器已經成功設置&#xff0c;群暉nas上對應端口的服務也已經部署好&#xff0c;可是如論如何也從外網訪問不到群暉服務器上&#xff0c;但是同樣是5000端口&#xff0c;群暉的外網管理端口就可以&#xff0c;最后…

在linux x86服務器安裝jdk

安裝JDK&#xff08;Java Development Kit&#xff09;在Linux x86 服務器上可以按照以下步驟進行操作。以下步驟假設你有root權限或者sudo權限。 1. 下載JDK安裝包 首先&#xff0c;你需要從Oracle官網或者OpenJDK官網下載JDK的安裝包。可以選擇對應的版本&#xff0c;比如J…

jmeter-beanshell學習8-for循環

一個稍微有點難度的東西 要把響應結果的所有名字都取出來&#xff0c;然后怎么處理看自己需求。比如找某個人是不是在這里&#xff0c;或者把所有人都寫進一個文檔&#xff0c;我就不編場景了 第一步想要取出所有名字&#xff0c;還得靠萬能的正則表達式提取器&#xff0c;jso…

【開源 Mac 工具推薦之 1】gibMacOS:方便快捷的 macOS 完整包下載 Shell 工具

簡介 gibMacOS 是由 GitHub 開發者 corpnewt 編寫的一款 Shell 工具。它采用 Python 編程語言&#xff0c;可以讓用戶打開后在純文本頁面中輕松選擇并下載來源于 Apple 官方的 macOS 完整安裝包。 Repo 地址&#xff1a;https://github.com/corpnewt/gibMacOS &#xff08;其…

【簡歷】某電子科技大學:前端實習簡歷指導,面試通過率低

注&#xff1a;為保證用戶信息安全&#xff0c;姓名和學校等信息已經進行同層次變更&#xff0c;內容部分細節也進行了部分隱藏 簡歷說明 這是一份一本某電子科技大學的同學簡歷&#xff0c;投遞的職位就是我們前端&#xff0c;但是因為學校是一本&#xff0c;我們說主要主體在…

路由協議的優先級,以及管理距離 AD 和 metric 的區別

路由協議的優先級&#xff08;Preference&#xff0c;即管理距離 Administrative Distance &#xff09;一般為一個 0 到 255 之間的數字&#xff0c;數字越大則優先級越低。表一是通常情況下各路由協議的優先級規定&#xff1a; 表一&#xff1a;一般路由協議優先級 路由協議…

Mybatis-plus 集成 PostgreSQL 數據庫自增序列問題記錄

1.創建序列并綁定id CREATE SEQUENCE biz_factory_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;"id" int4 NOT NULL DEFAULT nextval(sys_user_seq::regclass), 2.實體設置KeySequence和TableId注解 注意IdType.INPUT 和 KeySequence(value …

debian 12 PXE Server 批量部署系統

pxe server 前言 PXE&#xff08;Preboot eXecution Environment&#xff0c;預啟動執行環境&#xff09;是一種網絡啟動協議&#xff0c;允許計算機通過網絡啟動而不是使用本地硬盤。PXE服務器是實現這一功能的服務器&#xff0c;它提供了啟動鏡像和引導加載程序&#xff0c;…