네모난 색깔 변환
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background-color: red;
-webkit-animation-name: example; /* Chrome, Safari, Opera */
-webkit-animation-duration: 3s; /* Chrome, Safari, Opera */
}
/* Chrome, Safari, Opera */
@-webkit-keyframes example {
0% {background-color: red;}
25% {background-color: yellow;}
}
</style>
</head>
<body>
<div></div>
</body>
</html>
텍스트 보였다 사라졌다
<style>
#animation-example {
font-family: Arial;
text-align: center;
}
/* presently webkit-only */
@-webkit-keyframes pulse {
from {
opacity: 0.0;
font-size: 50px;
}
to {
opacity: 1.0;
font-size: 100px;
}
}
#animation-example {
-webkit-animation-name: pulse;
-webkit-animation-duration: 4s;
-webkit-animation-iteration-count: 1;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-direction: alternate;
}
</style>
<div id="animation-example" class="example">
Click
</div>