1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
- <html lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Overriding Animations</title>
- <script src="../../shared/javascript/utils.js" type="text/javascript" charset="utf-8"></script>
- <style type="text/css" media="screen">
- .container {
- position: relative;
- width: 400px;
- height: 120px;
- border: 1px solid black;
- margin: 10px;
- }
- .box {
- position: relative;
- width: 100px;
- height: 100px;
- margin: 10px;
- background-color: blue;
- z-index: 0;
- animation-name: slide;
- animation-duration: 1s;
- animation-direction: alternate;
- animation-timing-function: ease-in-out;
- animation-iteration-count: infinite;
- }
- .one {
- animation-duration: 0s;
- }
- .two {
- animation-duration: 0;
- }
-
- @keyframes slide {
- from { transform: translateX(0); }
- to { transform: translateX(280px); }
- }
- </style>
- </head>
- <body>
- <p>Single anim (should keep animating)</p>
- <div class="container" onclick="toggleClassName(this, 'highlighted')">
- <div class="box none">
- </div>
- </div>
- <p>duration: "0s" (should not animate)</p>
- <div class="container" onclick="toggleClassName(this, 'highlighted')">
- <div class="box one">
- </div>
- </div>
- <p>duration: "0" (should animate since inherits valid duration)</p>
- <div class="container" onclick="toggleClassName(this, 'highlighted')">
- <div class="box two">
- </div>
- </div>
- </body>
- </html>
|