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

CSS column-count प्रॉपर्टी को एनिमेट करें

CSS मल्टी-कॉलम लेआउट में column-count प्रॉपर्टी (कॉलम की संख्या) को एनिमेट करने के लिए @keyframes का उपयोग करें।

उदाहरण

<!DOCTYPE html> <html>    <head>       <style>          div {             width: 400px;             height: 300px;             background: white;             border: 10px solid red;             animation: myanim 3s infinite;             bottom: 30px;             position: absolute;          }          @keyframes myanim {             20% {                bottom: 100px;                box-shadow: 30px 45px 70px orange;                column-count: 4;             }          }          </style>    </head>    <body>       <h2>Performing Animation on column-count property</h2>       <div>This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text!</div>    </body> </html>

व्याख्या: प्रारंभ में कोई कॉलम काउंट नहीं (डिफ़ॉल्ट 1)। 20% कीफ्रेम पर column-count: 4 हो जाता है, जिससे टेक्स्ट 4 कॉलम में बंट जाता है, साथ ही एलिमेंट ऊपर चलता है।

  1. - CSS एनिमेशन के साथ vertical-align प्रॉपर्टी को एनिमेट करें

    CSS में vertical-align प्रॉपर्टी पर एनिमेशन लागू करने का तरीका यहां दिखाया गया है। यह इंलाइन या टेबल-सेल तत्वों के ऊर्ध्वाधर संरेखण को बदलता है। उदाहरण <!DOCTYPE html> <html> <head> <style> img { vertical-align: 80px; animation: myanim 3s;

  1. CSS में text-justify प्रॉपर्टी CSS में text-justify प्रॉपर्टी

    text-justify प्रॉपर्टी CSS में text-justify प्रॉपर्टी का उपयोग टेक्स्ट के जस्टिफिकेशन मेथड को सेट करने के लिए किया जाता है जब text-align प्रॉपर्टी को justify मान पर सेट किया जाता है। संभावित मान: text-justify: auto | inter-word | inter-character | none | initial | inherit; मानों का विवरण: auto

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

    right प्रॉपर्टी right प्रॉपर्टी का उपयोग एलिमेंट की क्षैतिज स्थिति सेट करने के लिए किया जाता है। यह पोजिशन्ड एलिमेंट्स (relative, absolute, fixed, sticky) पर काम करता है। सिंटैक्स: right: auto | length | % | initial | inherit; मान: auto: ब्राउज़र गणना करता है (डिफ़ॉल्ट) length: px, em, rem,