網站首頁 編程語言 正文
如果只是簡單的幾個小動畫 確實沒必要引入一個動畫庫 去做 除非你的項目中很需要各種各樣的動畫
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-08-22 Git配置別名簡化操作命令方式詳解_相關技巧
- 2022-04-12 C語言三分鐘精通時間復雜度與空間復雜度_C 語言
- 2022-05-09 Golang中Map按照Value大小排序的方法實例_Golang
- 2023-03-16 Flutter?Zone異常處理方法及基本原理_Android
- 2022-08-10 pandas中read_sql使用參數進行數據查詢的實現_python
- 2024-07-15 redis中存儲list<map>,list<entity>結構數據如何處理
- 2022-08-12 Python中深拷貝與淺拷貝的區別介紹_python
- 2022-12-16 簡單聊聊Go語言里面的閉包_Golang
- 最近更新
-
- 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同步修改后的遠程分支