css3如何实现弹跳效果

 时间:2024-10-12 12:26:22

1、打开编辑器,新建test.html页面,用于学习今天的内容

css3如何实现弹跳效果

3、在页面head标签下方写上<style></style>,在<style>标签内给test加上样式

css3如何实现弹跳效果

5、在<style>标签内把弹跳规则绑定到div上

css3如何实现弹跳效果

7、此处贴一下代码,以供参考:<!DOCTYPE html><挢旗扦渌;html> <head> 艘早祓胂 <meta charset="UTF-8"> <title>css3如何实现弹跳效果</title> <style> .test { width: 50%; text-align: center; margin: 50px auto; } .test { animation: myfirst 2s infinite; } @keyframes myfirst { 0% { transform: translate(0px, 0px); } 50% { transform: translate(0px, -10px); } 100% { transform: translate(0px, 0px); } } </style> </head> <body> <div class="test"> aaaa </div> </body></html>

  • 淘宝店铺固定背景代码
  • 淘宝怎么添加全屏轮播海报
  • 【更新】关于淘宝店铺全屏轮播图制作代码的方法
  • 淘宝系统自带的全屏轮播怎样使用
  • 如何设计淘宝网店首页?
  • 热门搜索
    怎么治失眠 读后感怎么写和示范 袖扣怎么用 苹果测距仪怎么用 螃蟹怎么蒸 炒年糕怎么做 猪八戒网怎么接任务 玻璃胶怎么去除 周记怎么写400字 酒后头疼怎么办