您的位置:首页 > Web前端 > HTML

第一次看到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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: