Search
 
SCRIPT & CODE EXAMPLE
 

CSS

animation

<!DOCTYPE html>
<html>
<body>
  <div class="cont">  
    <button class="btn"><span>Click me</span><img src="https://i.cloudup.com/2ZAX3hVsBE-3000x3000.png" height="62" width="62"></button>
      
        
    </div>
  <style>
  @-webkit-keyframes {
  }
  @-webkit-keyframes extend {
      0% {
          width: 600px;
          height: 200px;
          border-radius: 100px;
          } 10% {
          width: 610px;
          height: 210px;
          background: #fff;
          margin-left: - 5px;
          margin-top: - 5px;
          } 20% {
          width: 600px;
          height: 200px;
          background: #6fb07f;
          margin-left: 0px;
          margin-top: 0px;
          } 100% {
          width: 200px;
          height: 200px;
          border-radius: 100px;
          margin-left: 190px;
          background: #6fb07f;
          }
      }
  @keyframes extend {
      0% {
          width: 600px;
          height: 200px;
          border-radius: 100px;
          } 10% {
          width: 610px;
          height: 210px;
          background: #fff;
          margin-left: - 5px;
          margin-top: - 5px;
          } 20% {
          width: 600px;
          height: 200px;
          background: #6fb07f;
          margin-left: 0px;
          margin-top: 0px;
          } 100% {
          width: 200px;
          height: 200px;
          border-radius: 100px;
          margin-left: 190px;
          background: #f04014;
          }
      }
  @-webkit-keyframes {
  }
  @-webkit-keyframes disappear {
      0% {
          opacity: 1;
          } 20% {
          color: #fff;
          } 100% {
          opacity: 0;
          }
      }
  @keyframes disappear {
      0% {
          opacity: 1;
          } 20% {
          color: #fff;
          } 100% {
          opacity: 0;
          }
      }
  @-webkit-keyframes {
  }
  @-webkit-keyframes appear {
      0% {
          opacity: 0;
          } 70% {
          opacity: 0;
          } 100% {
          opacity: 1;
          }
      }
  @keyframes appear {
      0% {
          opacity: 0;
          } 70% {
          opacity: 0;
          } 100% {
          opacity: 1;
          }
      }
  html {
      background: rgb(165, 165, 165)
      }
  
  input, button, submit {
      border: none
      }
  
  .cont {
      position: absolute;
      width: 610px;
      height: 10px;
      left: 50%;
      top: 50%;
      margin: -100px 0 0 -300px
      }
  
  button {
      border-width: 1px;
      width: 600px;
      height: 200px;
      /*border-radius*/
      border-radius: 100px;
      background: #fff;
      position: absolute;
      border: 5px solid #09ec42
      }
  
  button > span {
      font-size: 48px;
      color: #06a19a
      }
  
  img {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      margin: auto;
      -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
      filter: alpha(opacity=0);
      opacity: 0
      }
  
  button:focus {
      /*animation*/
      -webkit-animation: extend 1s ease-in-out;
      -ms-animation: extend 1s ease-in-out;
      animation: extend 1s ease-in-out;
      -webkit-animation-fill-mode: forwards;
      /* Chrome, Safari, Opera */
      animation-fill-mode: forwards
      }
  
  button:focus > span {
      /*animation*/
      -webkit-animation: disappear 1s ease-in-out;
      -ms-animation: disappear 1s ease-in-out;
      animation: disappear 1s ease-in-out;
      -webkit-animation-fill-mode: forwards;
      /* Chrome, Safari, Opera */
      animation-fill-mode: forwards
      }
  
  button:focus > img {
      /*animation*/
      -webkit-animation: appear 1s ease-in-out;
      -ms-animation: appear 1s ease-in-out;
      animation: appear 1s ease-in-out;
      -webkit-animation-fill-mode: forwards;
      /* Chrome, Safari, Opera */
      animation-fill-mode: forwards
      }
  
  </style>
  <script>

document.addEventListener("DOMContentLoaded", function(event) {
  //Removing article link when on mobiforge
  console.log(document.referrer);
  if (parent !== window && document.referrer.indexOf('https://mobiforge.com') === 0 && document.referrer.indexOf('http://mobiforge.com') === 0)
  {  
    console.log(document.referrer);
    document.getElementById('article-link').className = "fade-out";
  }

});
  </script>
</body>
</html>
Comment

animation

<!DOCTYPE html>
<html>
<style>
#container {
  width: 400px;
  height: 400px;
  border-radius: 10%;
  position: relative;
  background: rgb(130, 240, 231);
}
#animate {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid rgb(218, 15, 15);
  position: absolute;
  background-color: rgb(51, 255, 0);
}
</style>
<body>

<p><button onclick="myMove()">Click Me</button></p> 

<div id ="container">
  <div id ="animate"><br><p>(★‿★)</p></div>
  <br><br>
  <br><p>hello from mohammad alshraideh</p>
</div>

<script>
function myMove() {
  let id = null;
  const elem = document.getElementById("animate");   
  let pos = 0;
  clearInterval(id);
  id = setInterval(frame, 5);
  function frame() {
    if (pos == 350) {
      clearInterval(id);
    } else {
      pos++; 
      elem.style.top = pos + "px"; 
      elem.style.left = pos + "px"; 
    }
  }
}
</script>

</body>
</html>
Comment

animation

// Web Animation API Keyframes options
var options = {
  iterations: Infinity,
  iterationStart: 0,
  delay: 0,
  endDelay: 0,
  direction: 'alternate',
  duration: 700,
  fill: 'forwards',
  easing: 'ease-out',
}
element.animate(keyframes, options);
Comment

animation

.my-element {
  display: inline-block;
  margin: 0 0.5rem;

  animation: bounce; /* referring directly to the animation's @keyframe declaration */
  animation-duration: 2s; /* don't forget to set a duration! */
}
Comment

animation

The generation of repeated renderings of a scene quickly enough, with smoothly changing viewpoint or object positions, that the illusion of motion is achieved. OpenGL animation almost always uses double-buffering.
Comment

PREVIOUS NEXT
Code Example
Css :: color code for maroon 
Css :: css table flex 
Css :: tailwind css flex-row-reverse for grid reverse 
Css :: input css for disabled state 
Css :: css cursor forbidden 
Css :: media queries and or conditions 
Css :: font face html 
Css :: bootstrap database table cdn 
Css :: how fixed image at top 
Css :: losange css 
Css :: image align text align in center 
Css :: increase Nth-child CSS 
Css :: showing two iframes side by side 
Css :: css saturate 
Css :: generate your tailwind.config.js file 
Css :: how to make a text in center with background color in css 
Css :: css buttons 
Css :: download styles.css 
Css :: image transparent 
Css :: first-letter css 
Css :: alacritty auto start fish 
Css :: add space inbetween words of text 
Css :: CSS :hover Selector 
Css :: scss to css 
Css :: css color word multiple colors 
Css :: make element fit in vh and vw 
Css :: ohmyzsh shortcut to oepn folder with vscode 
Css :: add css class c# 
Css :: applying multiple transform values to an object css 
Css :: boxsizing 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =