第一次看到html的动画效果,好神奇

来源:互联网 发布:淘宝上买避孕套干净吗 编辑:程序博客网 时间:2024/04/28 19:20
<!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>
0 0
原创粉丝点击