網站首頁 編程語言 正文
仿 Vivo OriginOS 無清理項動畫
因為我自己的手機是 vivo 品牌, 其中的一些動畫挺有意思的, 就像模仿看看. 先看效果
HTML
<body>
<div class="container flex">
<div class="flex wrapper">
<div class="icons">
<div class="bar upper"></div>
<div class="ball"></div>
<div class="bar lower"></div>
</div>
<div class="tips">無清理項</div>
</div>
</div>
</body>
CSS
* {
margin: 0;
padding: 0;
font-family: monospace, sans-serif;
font-weight: bold;
}
.flex {
display: flex;
justify-content: center;
align-items: center;
}
.container {
height: 100vh;
background-color: #fff;;
}
.wrapper {
flex-direction: column;
}
.icons {
height: 2rem;
position: relative;
}
.bar {
width: 2em;
height: 3px;
}
.upper {
background-color: rgb(0, 0, 0);
transform: translateY(calc( 1em - 50% ));
animation: upper-move .5s linear forwards;
animation-delay: .5s;
}
.lower {
background-color: rgb(219, 219, 219);
animation: lower-move 1s linear forwards;
}
.ball {
height: 5px;
width: 5px;
border-radius: 50%;
background-color: rgb(23, 194, 158);
animation: ball-move 1s linear forwards;
animation-delay: 1s;
position: absolute;
top: 50%;
transform: translateY(-50%);
right: -5px;
opacity: 0;
}
.tips {
margin-top: 1em;
color: rgb(175, 175, 175);
font-family: 黑體;
-ms-user-select: none;
-webkit-user-select: none;
user-select: none;
}
@keyframes upper-move {
to {
transform: translateY(calc( (2em - 100%)));
}
}
@keyframes lower-move {
from {
transform: translateX(-100%) translateY(calc( 1em - 150% ));
}
50% {
transform: translateX(0) translateY(calc( 1em - 150% ));;
}
to {
transform: translateY(-100%);
}
}
@keyframes ball-move {
from {
right: -5px;
}
33% {
right: calc(100% + 5px);
}
66% {
right: -5px;
}
to {
right: 5px;
opacity: 1;
}
}
原文鏈接:https://blog.csdn.net/broken_promise/article/details/124536738
相關推薦
- 2022-09-04 Go語言之嵌入類型詳解_Golang
- 2021-12-16 Docker快速部署SpringBoot項目介紹_docker
- 2022-07-22 如何測試webservice接口
- 2022-03-29 Python雙端隊列實現回文檢測_python
- 2022-05-28 Redis如何使用樂觀鎖(CAS)保證數據一致性_Redis
- 2022-09-28 Dephi逆向工具Dede導出函數名MAP導入到IDA中的實現方法_python
- 2023-02-06 Python實現號碼歸屬地查詢功能_python
- 2022-12-01 C++中單鏈表操作的示例代碼_C 語言
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支