Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
- <meta charset="utf-8">
- <title>Document</title>
- <script src="jquery.js"></script> <!-- tutaj podepnij jquery -->
- <style type="text/css">
- .BlinkingEyesAnimationCSS {
- /* Safari 4.0 - 8.0 */
- -webkit-animation-name: example;
- -webkit-animation-duration: 3s;
- -webkit-animation-timing-function: linear;
- -webkit-animation-iteration-count: infinite;
- -webkit-animation-direction: alternate;
- /* Standard syntax */
- animation-name: example;
- animation-duration: 3s;
- animation-timing-function: linear;
- animation-iteration-count: infinite;
- animation-direction: alternate;
- }
- .eye {
- height: 100px;
- width: 100px;
- background: red;
- float: left;
- margin-left: 10px;
- }
- #Pole {
- height: 500px;
- width: 500px;
- border: 1px solid black;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- @-webkit-keyframes example {
- 75% {
- width: 40%;
- }
- 100% {
- width: 5%;
- }
- }
- @keyframes example {
- 75% {
- width: 40%;
- }
- 100% {
- width: 5%;
- }
- }
- </style>
- </head>
- <body>
- <div class='eye' id="EyesID1"></div>
- <div class='eye' id="EyesID2"></div>
- <div class="InvisibilityDivToBlinkEyesOfTheSun" id="Pole"></div>
- <script>
- $('#Pole').mouseenter(function() {
- $('.eye').addClass('BlinkingEyesAnimationCSS');
- });
- $('#Pole').mouseleave(function() {
- $('.eye').removeClass('BlinkingEyesAnimationCSS');
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement