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

CSS transition-duration प्रॉपर्टी


ट्रांजिशन की अवधि सेट करने के लिए transition-duration प्रॉपर्टी का उपयोग करें।

उदाहरण

<!DOCTYPE html> <html>    <head>       <style>          div {             width: 150px;             height: 150px;             background: blue;             transition-property: height;             transition-duration: 2s;          }          div:hover {             height: 200px;          }       </style>    </head>    <body>       <h1>Heading One</h1>       <p>Hover over the below box to change its height.</p>       <div></div>    </body> </html>

  1. - CSS flex-shrink प्रॉपर्टी पर एनिमेशन करें

    फ्लेक्स-श्रिंक एनिमेशन flex-shrink प्रॉपर्टी पर CSS एनिमेशन लागू करें: उदाहरण <!DOCTYPE html> <html> <head> <style> .mycontainer { display: flex; background-color: orange; } .mycontainer > div { background-color: white; text-align: center;

  1. - CSS height प्रॉपर्टी को एनिमेट करें

    CSS में height प्रॉपर्टी पर एनिमेशन लागू करने का तरीका यहां दिखाया गया है। यह किसी तत्व की ऊंचाई को समय के साथ बदलता है। उदाहरण <!DOCTYPE html> <html> <head> <style> div { border: 2px solid black; width: 300px; height: 100px;

  1. CSS isolation प्रॉपर्टी CSS isolation प्रॉपर्टी

    isolation प्रॉपर्टी का उपयोग यह परिभाषित करने के लिए किया जाता है कि कोई तत्व एक नया स्टैकिंग संदर्भ बनाएगा या नहीं। सिंटैक्स isolation: auto | isolate | initial | inherit; उदाहरण <!DOCTYPE html> <html> <head> <style> .demo1 { background-color: orange; }