Advertisement
Guest User

Untitled

a guest
Sep 11th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.12 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.  
  4. <head>
  5.     <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  6.     <meta charset="utf-8">
  7.     <title>Document</title>
  8.     <script src="jquery.js"></script> <!-- tutaj podepnij jquery -->
  9.     <style type="text/css">
  10.         .BlinkingEyesAnimationCSS {
  11.             /* Safari 4.0 - 8.0 */
  12.             -webkit-animation-name: example;
  13.             -webkit-animation-duration: 3s;
  14.             -webkit-animation-timing-function: linear;
  15.             -webkit-animation-iteration-count: infinite;
  16.             -webkit-animation-direction: alternate;
  17.             /* Standard syntax */
  18.             animation-name: example;
  19.             animation-duration: 3s;
  20.             animation-timing-function: linear;
  21.             animation-iteration-count: infinite;
  22.             animation-direction: alternate;
  23.         }
  24.  
  25.         .eye {
  26.             height: 100px;
  27.             width: 100px;
  28.             background: red;
  29.             float: left;
  30.             margin-left: 10px;
  31.         }
  32.  
  33.         #Pole {
  34.             height: 500px;
  35.             width: 500px;
  36.             border: 1px solid black;
  37.             position: absolute;
  38.             top: 50%;
  39.             left: 50%;
  40.             transform: translate(-50%, -50%);
  41.         }
  42.  
  43.         @-webkit-keyframes example {
  44.             75% {
  45.                 width: 40%;
  46.  
  47.             }
  48.             100% {
  49.                 width: 5%;
  50.             }
  51.         }
  52.  
  53.         @keyframes example {
  54.             75% {
  55.                 width: 40%;
  56.             }
  57.             100% {
  58.                 width: 5%;
  59.             }
  60.         }
  61.  
  62.     </style>
  63. </head>
  64.  
  65. <body>
  66.  
  67.     <div class='eye' id="EyesID1"></div>
  68.     <div class='eye' id="EyesID2"></div>
  69.     <div class="InvisibilityDivToBlinkEyesOfTheSun" id="Pole"></div>
  70.  
  71.  
  72.     <script>
  73.         $('#Pole').mouseenter(function() {
  74.             $('.eye').addClass('BlinkingEyesAnimationCSS');
  75.         });
  76.         $('#Pole').mouseleave(function() {
  77.             $('.eye').removeClass('BlinkingEyesAnimationCSS');
  78.         });
  79.  
  80.     </script>
  81. </body>
  82.  
  83. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement