当前位置:网站首页>【案例】一个熊在跑的动画animation
【案例】一个熊在跑的动画animation
2022-08-05 16:11:00 【发呆少女】
<!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>Document</title>
<style> * {
margin: 0; padding: 0; } body {
background-color: darkblue; } .mountain {
position: relative; height: 336px; background-image: url(./mountain.png); animation: mountain 10s linear infinite; } .bear {
position: absolute; top: 200px; left: 0; width: 200px; height: 100px; background: url(./bear.png) no-repeat; animation: bear 1s steps(8) infinite, move 2s linear forwards; } @keyframes bear {
0% {
} 100% {
background-position: -1600px 0; } } @keyframes move {
0% {
} 100% {
left: 50%; transform: translate(-50%, 0); } } @keyframes mountain {
0% {
} 100% {
background-position: -3840px 0; } } </style>
</head>
<body>
<div class="mountain">
<div class="bear"></div>
</div>
</body>
</html>

素材:

边栏推荐
- HDBaseT是什么协议?与SDI和HDMI比较有哪些区别?
- High Numbers_Prove_Uniqueness of Limits
- 1003 Emergency
- 高数_证明_最值定理
- SQL注入进阶篇(一)
- 《安富莱嵌入式周报》第276期:2022.07.25--2022.07.3
- 机器人强化学习——COCOI: Contact-aware Online Context Inference for Generalizable Non-planar Pushing(21 ICRA)
- 数据思维总结:
- The annual gas transmission volume of the West-East Gas Pipeline exceeds 100 billion cubic meters for the first time, and Tupu helps pipeline monitoring
- 肇庆广发证券股票开户安全吗,是大券商吗
猜你喜欢

NFT、元宇宙,电商巨头满身大汗挤进Web3.0

The high number of _ _ the most value theorem

Study Notes 227—Word automatic catalog, there is a space after the catalog number, how can I set it to remove it?

Translating Images into Maps 论文笔记

高数_证明_极限存在的夹逼准则

Largest rectangle in histogram

HDBaseT是什么协议?与SDI和HDMI比较有哪些区别?

华为设备配置MSTP+VRRP组合组网

关于将本地 SAP UI5 应用配置到本地 Fiori Launchpad 的技术实现深入讲解试读版

Redis系列5:深入分析Cluster 集群模式
随机推荐
PR Video Editing Tutorial - Video Effects and Transitions
C语言之链表简单操作(亲测可用)
Basic Concepts in Network Communication
The annual gas transmission volume of the West-East Gas Pipeline exceeds 100 billion cubic meters for the first time, and Tupu helps pipeline monitoring
UVa1149 - Bin Packing
编译器工程师眼中的好代码:Loop Interchange
高数_证明_极限存在的夹逼准则
图书管理系统(基于内存实现的简单小型项目)
流行的 Web 框架安全性比较
浅谈推荐系统中的样本拼接
数据库篇——hash索引
对抗 | 利用de4dot解密被混淆的.NET代码
程序员35岁之后不写程序了,该怎样职业规划?
黑马瑞吉外卖之员工账号的禁用和启用以及编辑修改
首创期货开户是否可靠?资金安全吗?
高数_证明_最值定理
拉格朗日对偶问题
小伙伴面试之成都创宇知道
【构造方法概述 Objective-C中】
Redis - Talking about master-slave synchronization