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

CSS user-select प्रॉपर्टी


टेक्स्ट सिलेक्शन नियंत्रित करें

CSS user-select प्रॉपर्टी का उपयोग यह सेट करने के लिए करें कि एलिमेंट का टेक्स्ट चुना जा सकता है या नहीं।

उदाहरण

<!DOCTYPE html>
<html>
  <head>
    <style>
      div { user-select: none; }
    </style>
  </head>
  <body>
    <h2>This is demo heading</h2>
    <div>This is demo text. You won't be able to select it.</div>
  </body>
</html>

  1. - CSS white-space प्रॉपर्टी

    white-space प्रॉपर्टी का उपयोग किसी तत्व के अंदर व्हाइट स्पेस (स्पेस, टैब, लाइन ब्रेक) को कैसे संभाला जाए, इसे नियंत्रित करने के लिए किया जाता है। उदाहरण <!DOCTYPE html> <html> <head> <style> p.demo1 { white-space: normal; } p.demo2 {

  1. CSS में writing-mode प्रॉपर्टी CSS में writing-mode प्रॉपर्टी

    writing-mode प्रॉपर्टी का उपयोग यह सेट करने के लिए किया जाता है कि टेक्स्ट की लाइनें क्षैतिज या लंबवत रूप से रखी गई हैं। प्रॉपर्टी मान writing-mode: horizontal-tb | vertical-rl | vertical-lr; उदाहरण <!DOCTYPE html> <html> <head> <style> p { writing-mode: vertic

  1. CSS pointer-events प्रॉपर्टी CSS pointer-events प्रॉपर्टी

    pointer-events प्रॉपर्टी तय करती है कि तत्व पॉइंटर इवेंट (क्लिक, होवर, टच) पर प्रतिक्रिया देगा या नहीं। none से तत्व क्लिक-थ्रू हो जाता है, auto डिफ़ॉल्ट व्यवहार है। उदाहरण <!DOCTYPE html> <html> <head> <style> body { font-family: Segoe UI, Tahoma, Geneva, Verdana, sa