第一次看到html的动画效果,好神奇
2016-01-09 10:51
567 查看
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>example</title>
<style type="text/css">
p{
padding: 4px;
border: thin solid black;
margin: 2px;
background-color: lightgray;
font-family: sans-serif;
}
#banana{
font-size: large;
border: medium solid black;
}
#banana:hover{
-webkit-animation-delay: 100ms;
-webkit-animation-duration: 500ms;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
-webkit-animation-name: 'GrowShrink';
}
@-webkit-keyframes GrowShrink{
from{
font-size: xx-small;
border: thin solid black;
background-color: red;
}
to{
font-size: x-large;
border: medium solid white;
background-color: green;
color: white;
padding: 4px;
}
}
</style>
</head>
<body>
<p>
There are lots of different kinds of fruit.there are over 500 varieties of <span id="banana">banana</span> alone.By the time we add the countless types of apples, orange,and other well-known fruit,we are faced with thousands
of choices.
</p>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>example</title>
<style type="text/css">
p{
padding: 4px;
border: thin solid black;
margin: 2px;
background-color: lightgray;
font-family: sans-serif;
}
#banana{
font-size: large;
border: medium solid black;
}
#banana:hover{
-webkit-animation-delay: 100ms;
-webkit-animation-duration: 500ms;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
-webkit-animation-name: 'GrowShrink';
}
@-webkit-keyframes GrowShrink{
from{
font-size: xx-small;
border: thin solid black;
background-color: red;
}
to{
font-size: x-large;
border: medium solid white;
background-color: green;
color: white;
padding: 4px;
}
}
</style>
</head>
<body>
<p>
There are lots of different kinds of fruit.there are over 500 varieties of <span id="banana">banana</span> alone.By the time we add the countless types of apples, orange,and other well-known fruit,we are faced with thousands
of choices.
</p>
</body>
</html>
相关文章推荐
- html页面打印
- Sublime Text 运行HTML
- 【HTML/XML 3】XML 简介,来源
- 【HTML/XML 3】XML 简介,来源
- HTML简单总结
- html屏蔽鼠标右键
- 简易在线html编辑器
- 去除HTML标签
- @HTML.RadioButtonFor和@Html.DropDownList用法
- 去掉所有的html标签
- HTML 页面打印
- HTML元素的显示优先级
- html冷门知识
- 关于html标签闭合与不闭合的分析
- HTML table
- 20160108HTML学习笔记html的四大基本结构
- HTML 分组无序列表和有序列表
- XMHML-Day01
- HTML超链接,描点
- HTML-Day02-2