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

CSS column-rule-color से कॉलम के बीच नियम (रेखा) का रंग सेट करें

CSS column-rule-color प्रॉपर्टी मल्टी-कॉलम लेआउट में कॉलम के बीच खींची जाने वाली रेखा (नियम/रूल) का रंग निर्दिष्ट करती है। यह column-rule-style (रेखा शैली) और column-rule-width (चौड़ाई) के साथ संयोजन में काम करती है।

उदाहरण

नीचे दिए गए उदाहरण में, 4 कॉलम लेआउट में कॉलम के बीच नारंगी रंग की डैश्ड रेखा (column-rule-color: orange, column-rule-style: dashed) खींची गई है।

<!DOCTYPE html>
<html>
<head>
  <style>
    .demo {
      column-count: 4;
      column-gap: 50px;
      column-rule-color: orange;
      column-rule-style: dashed;
    }
  </style>
</head>
<body>
  <div class="demo">
    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. This is demo text. This is demo text. This is demo text.
    This is demo text. This is demo text.
  </div>
</body>
</html>

कॉलम नियम प्रॉपर्टीज:

  • column-rule-width: रेखा की चौड़ाई
  • column-rule-style: रेखा शैली (solid, dashed, dotted, double, आदि)
  • column-rule-color: रेखा का रंग
  • column-rule: शॉर्टहैंड (width style color)

पूर्वापेक्षा: column-count या column-width सेट होना चाहिए (कम से कम 2 कॉलम)।

  1. CSS के साथ टेक्स्ट की अंतिम लाइन को संरेखित करें CSS के साथ टेक्स्ट की अंतिम लाइन को संरेखित करें

    text-align-last प्रॉपर्टी का उपयोग टेक्स्ट की अंतिम लाइन को संरेखित करने के लिए किया जाता है। CSS के साथ टेक्स्ट की अंतिम लाइन को संरेखित करने के लिए निम्नलिखित कोड आज़माएं: उदाहरण <!DOCTYPE html> <html>    <head>       <style>       &

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

    CSS में columns प्रॉपर्टी पर एनिमेशन लागू करने के लिए, आप निम्न कोड आज़मा सकते हैं। यह उदाहरण दिखाता है कि कैसे कॉलम काउंट, कॉलम नियम रंग, और अन्य प्रॉपर्टीज़ को एनिमेट किया जा सकता है। उदाहरण <!DOCTYPE html> <html> <head> <style> div { width: 600px;

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

    टेक्स्ट सजावट (अंडरलाइन, ओवरलाइन, लाइन-थ्रू) का रंग सेट करने के लिए text-decoration-color प्रॉपर्टी का उपयोग करें। यह text-decoration-line और text-decoration-style से स्वतंत्र रूप से रंग नियंत्रित करता है। उदाहरण <!DOCTYPE html> <html> <head> <style> .demo {