Computer >> कंप्यूटर ट्यूटोरियल >  >> प्रोग्रामिंग >> CSS

CSS के साथ फेड इन अप एनिमेशन प्रभाव

CSS के साथ किसी इमेज पर फेड इन अप एनिमेशन प्रभाव लागू करने के लिए, आप निम्न कोड चला सकते हैं:

उदाहरण

<html>
  <head>
    <style>
      .animated {
        background-image: url(/css/images/logo.png);
        background-repeat: no-repeat;
        background-position: left top;
        padding-top: 95px;
        margin-bottom: 60px;
        -webkit-animation-duration: 10s;
        animation-duration: 10s;
        -webkit-animation-fill-mode: both;
        animation-fill-mode: both;
      }
      @-webkit-keyframes fadeIn {
        0% {opacity: 0;}
        100% {opacity: 1;}
      }
      @keyframes fadeIn {
        0% {opacity: 0;}
        100% {opacity: 1;}
      }
      .fadeIn {
        -webkit-animation-name: fadeIn;
        animation-name: fadeIn;
      }
    </style>
  </head>
  <body>
    <div id="animated-example" class="animated fadeIn"></div>
    <button onclick="myFunction()">पेज रीलोड करें</button>
    <script>
      function myFunction() {
        location.reload();
      }
    </script>
  </body>
</html>

व्याख्या: यह एनिमेशन एलिमेंट को अदृश्य (opacity:0) से पूरी तरह दृश्यमान (opacity:1) बनाती है। फेड इन अप के लिए ट्रांसफॉर्म जोड़ सकते हैं।

  1. - CSS के साथ Flip एनिमेशन प्रभाव

    एक तत्व अचानक तेज गति से पलट सकता है या पलट सकता है। उदाहरण <html> <head> <style> .animated { background-image: url(/css/images/logo.png); background-repeat: no-repeat; background-position: left top; padding-top:95px; margin-bott

  1. - CSS के साथ Flash एनिमेशन प्रभाव

    एक तत्व की अचानक संक्षिप्त चमकदार रोशनी फ्लैश प्रभाव बनाती है। उदाहरण <html> <head> <style> .animated { background-image: url(/css/images/logo.png); background-repeat: no-repeat; background-position: left top; padding-top:95px; m

  1. - CSS के साथ Fade Out Up Big एनिमेशन प्रभाव

    CSS के साथ किसी इमेज पर Fade Out Up Big एनिमेशन प्रभाव लागू करने के लिए, आप निम्न कोड आज़मा सकते हैं: उदाहरण <html> <head> <style> .animated { background-image: url(/css/images/logo.png); background-repeat: no-repeat; background-position: left t