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

CSS column-rule शॉर्टहैंड से कॉलम नियम की सभी प्रॉपर्टीज एक साथ सेट करें

CSS column-rule शॉर्टहैंड प्रॉपर्टी column-rule-width, column-rule-style, और column-rule-color तीनों को एक साथ सेट करती है। यह मल्टी-कॉलम लेआउट में कॉलम के बीच की रेखा को परिभाषित करने का संक्षिप्त तरीका है।

उदाहरण

नीचे दिए गए उदाहरण में, column-rule: 2px dotted orange शॉर्टहैंड का उपयोग करके 2px चौड़ी, नारंगी, डॉटेड कॉलम नियम सेट की गई है।

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

column-rule सिंटैक्स: column-rule: <width> <style> <color>

  • width: thin, medium, thick, या लंबाई (2px)
  • style: none, hidden, dotted, dashed, solid, double, groove, ridge, inset, outset
  • color: कोई भी वैध CSS रंग

व्यक्तिगत प्रॉपर्टीज भी उपलब्ध: column-rule-width, column-rule-style, column-rule-color।

  1. CSS में Background शॉर्टहैंड प्रॉपर्टी CSS में Background शॉर्टहैंड प्रॉपर्टी

    CSS background शॉर्टहैंड प्रॉपर्टी का उपयोग किसी एलिमेंट के लिए बैकग्राउंड को परिभाषित करने के लिए किया जाता है। background-color, background-image, background-repeat, background-position, background-clip, background-size, background-origin और background-attachment मिलकर CSS background प्रॉपर्टीज बन

  1. CSS में Outline शॉर्टहैंड प्रॉपर्टी CSS में Outline शॉर्टहैंड प्रॉपर्टी

    आउटलाइन शॉर्टहैंड प्रॉपर्टी को एलिमेंट के बॉर्डर्स के चारों ओर एक विशिष्ट शैली (आवश्यक), मोटाई, और रंग की लाइन खींचने के लिए परिभाषित किया जा सकता है, लेकिन बॉर्डर प्रॉपर्टी के विपरीत आउटलाइन एलिमेंट के डायमेंशन्स का हिस्सा नहीं होती। सिंटैक्स CSS outline शॉर्टहैंड प्रॉपर्टी का सिंटैक्स निम्नलिखित

  1. CSS में कलर प्रॉपर्टी सेट करना CSS में कलर प्रॉपर्टी सेट करना

    हम CSS का उपयोग करके एलिमेंट्स के टेक्स्ट, बॉर्डर्स और बैकग्राउंड के लिए कलर्स परिभाषित कर सकते हैं। color प्रॉपर्टी का उपयोग किसी एलिमेंट के लिए टेक्स्ट कलर स्पेसिफाई करने के लिए किया जाता है।सिंटैक्सCSS color प्रॉपर्टी का सिंटैक्स निम्नलिखित है:Selector { color: /*value*/ }निम्नलिखित उदाहरण CSS co