網站首頁 編程語言 正文
如果只是簡單的幾個小動畫 確實沒必要引入一個動畫庫 去做 除非你的項目中很需要各種各樣的動畫
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Documenttitle>
<style>
div.parent {
display: flex;
}
.child {
height: 50px;
width: 200px;
background-color: #aaf;
text-align: center;
line-height: 50px;
border-radius: 16px;
position: relative;
top: 100px;
left: 50%;
transform: translateX(-50%);
transition: all 1s;
animation: jump .5s ease-in-out infinite alternate;
}
.child::after {
content: "";
height: 0;
width: 0;
position: absolute;
bottom: -20px;
left: 50%;
transform: translateX(-50%);
border: 10px solid;
border-color: #aaf transparent transparent transparent;
}
@keyframes jump {
from { top: 100px; }
to { top: 120px }
}
style>
head>
<body>
<div class="parent">
<div class="child">
一個簡單的跳動動畫
div>
div>
body>
html>
關注我 持續更新前端知識。
原文鏈接:https://yunchong.blog.csdn.net/article/details/122609951
相關推薦
- 2022-05-08 Python集合set的交集和并集操作方法_python
- 2022-04-05 debian:根據文件名稱,找到對應的包
- 2022-10-02 golang?NewRequest/gorequest實現http請求的示例代碼_Golang
- 2022-07-14 Android實現ViewFlipper圖片動畫滑動_Android
- 2022-06-09 FreeRTOS軟件定時器apollo中斷狀態判斷_操作系統
- 2022-11-10 C++?TCP網絡編程詳細講解_C 語言
- 2022-03-31 詳解C語言中的Static關鍵字_C 語言
- 2022-03-27 C語言中const,指針和引用的關系_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同步修改后的遠程分支