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

एनिमेशन का स्पीड कर्व सेट करने के लिए कौन सी CSS प्रॉपर्टी उपयोग करें?


एनिमेशन का स्पीड कर्व सेट करने के लिए animation-timing-function का उपयोग करें। ease और ease-in एनिमेशन इफेक्ट सेट करने के लिए निम्न कोड चलाकर देखें:

उदाहरण

<!DOCTYPE html> <html>    <head>       <style>          div {             width: 150px;             height: 200px;             position: relative;             background-color: yellow;             animation-name: myanim;             animation-duration: 2s;             animation-direction: alternate-reverse;             animation-iteration-count: 3;          }          @keyframes myanim {             from {left: 100px;}             to {left: 200px;}          }          #demo1 {animation-timing-function: ease;}          #demo2 {animation-timing-function: ease-in;}          </style>    </head>    <body>       <div id = "demo1">ease effect</div>       <div id = "demo2">ease-in effect</div>    </body> </html>

  1. CSS में टेक्स्ट पर सजावट का प्रकार सेट करें CSS में टेक्स्ट पर सजावट का प्रकार सेट करें

    टेक्स्ट पर उपयोग की जाने वाली सजावट का प्रकार सेट करने के लिए text-decoration-line प्रॉपर्टी का उपयोग करें। CSS में हमारे पास टेक्स्ट सजावट के लिए निम्न विकल्प हैं: text-decoration-line: none | underline | overline | line-through | initial | inherit; उदाहरण <!DOCTYPE html> <html> <

  1. CSS में border-width प्रॉपर्टी CSS में border-width प्रॉपर्टी

    बॉर्डर चौड़ाई CSS border-width प्रॉपर्टी का उपयोग किसी एलिमेंट के बॉर्डर की चौड़ाई निर्दिष्ट करने के लिए किया जाता है। हम border-top-width, border-right-width, border-bottom-width, border-left-width से व्यक्तिगत पक्षों की चौड़ाई भी सेट कर सकते हैं। सिंटैक्स Selector { border-width: /*value*/ } उदाह

  1. CSS में max-height प्रॉपर्टी CSS में max-height प्रॉपर्टी

    हम CSS max-height प्रॉपर्टी का उपयोग करके किसी एलिमेंट के कंटेंट बॉक्स के लिए एक निश्चित अधिकतम ऊंचाई परिभाषित कर सकते हैं जो एलिमेंट के कंटेंट बॉक्स को उससे ऊंचा नहीं होने देती, भले ही ऊंचाई max-height से अधिक हो। सिंटैक्स CSS max-height प्रॉपर्टी का सिंटैक्स निम्नानुसार है: Selector {