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

CSS से लेफ्ट बॉर्डर की चौड़ाई सेट करें

border-left-width प्रॉपर्टी का उपयोग

किसी एलिमेंट के बाएं बॉर्डर की चौड़ाई सेट करने के लिए border-left-width प्रॉपर्टी का उपयोग किया जाता है। इसके लिए border-style भी परिभाषित होना चाहिए।

उदाहरण

<!DOCTYPE html>
<html>
  <head>
    <style>
      p {
        border-style: dashed;
        border-left-width: 10px;
      }
    </style>
  </head>
  <body>
    <p>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.</p>
  </body>
</html>

संभावित मान: thin, medium (डिफ़ॉल्ट), thick, या कोई लंबाई मान (px, em, rem, आदि)।

  1. CSS से टेक्स्ट इंडेंटेशन CSS से टेक्स्ट इंडेंटेशन

    text-indent प्रॉपर्टी टेक्स्ट इंडेंटेशन के लिए CSS में text-indent प्रॉपर्टी का उपयोग करें। यह पैराग्राफ की पहली लाइन की इंडेंटेशन के लिए है। उदाहरण 1: 30px इंडेंट <!DOCTYPE html> <html> <head> <style> div { text-indent: 30px; } </style> </head> <body> <

  1. CSS में ::first-line स्यूडो-एलिमेंट CSS में ::first-line स्यूडो-एलिमेंट

    CSS का ::first-line स्यूडो-एलिमेंट किसी एलिमेंट की सामग्री की पहली लाइन को चुनता है। हालांकि, यदि टेक्स्ट वाले कंटेनर की चौड़ाई निश्चित नहीं है, तो लाइन की लंबाई विंडो के आकार के अनुसार बदल सकती है। उदाहरण आइए CSS ::first-line स्यूडो-एलिमेंट का एक उदाहरण देखें: <!DOCTYPE html> <html> &l

  1. CSS में @media At-rules CSS में @media At-rules

    CSS @media नियम का उपयोग एक ही स्टाइल शीट में विभिन्न मीडिया टाइप्स (जैसे print, screen, all, आदि) के लिए अलग-अलग स्टाइल्स स्पेसिफाई करने के लिए किया जाता है। यह आमतौर पर मीडिया टाइप्स की कॉमा-सेपरेटेड लिस्ट और CSS डिक्लेरेशन ब्लॉक द्वारा फॉलो किया जाता है जिसमें टारगेट मीडिया के लिए स्टाइल नियम होत