w3resource
HTML exercises

CSS Properties: How to Specify the name of the keyframe you want to bind to the selector?

Go to Exercise page

Solution:

HTML Code:

<!DOCTYPE html>
<html>
<head>
<title>How to Specify the name of the keyframe you want to bind to the selector</title>
</head>
<body>
<p>w3resource</p>
<div></div>
<p>Tutorial</p>
<style type="text/css">
div {
width: 80px;
height: 120px;
background: #CC00CC;
position: relative;
-webkit-animation-name: move;  /* Chrome, Safari, Opera */
-webkit-animation-duration: 8s;  /* Chrome, Safari, Opera */
animation-name: move;
animation-duration: 8s;
}

/* Chrome, Safari, Opera */
@-webkit-keyframes move {
    from {left: 0px;}
    to {left: 200px;}
}

@keyframes move {
    from {left: 0px;}
    to {left: 200px;}
}
</style>
</body>
</html>

Live Demo:

See the Pen animation-name-answer by w3resource (@w3resource) on CodePen.


See the solution in the browser

Supported browser

Firefox logo Chrome logo Opera logo Safari logo Internet Explorer logo
Yes Yes Yes Yes No

Go to Exercise page

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming


bedava porno