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

CSS से टेक्स्ट ट्रांसफॉर्मेशन


CSS text-transform प्रॉपर्टी हमें किसी एलिमेंट के लिए टेक्स्ट कैपिटलाइज़ेशन सेट करने की अनुमति देती है। यह निम्नलिखित मान स्वीकार कर सकती है: capitalize, lowercase, uppercase, full-width, full-size-kana और none।

सिंटैक्स

CSS text-transform प्रॉपर्टी का सिंटैक्स निम्नलिखित है:

Selector { text-transform: /*value*/ }

उदाहरण

निम्नलिखित उदाहरण CSS text-transform प्रॉपर्टी को दर्शाते हैं:

<!DOCTYPE html> <html> <head> <style> h2 { text-transform: uppercase; } .demo { text-transform: lowercase; } q { text-transform: capitalize; font-style: italic; } </style> </head> <body> <h2>WordPress</h2> <q>WordPress is open source software you can use to create a beautiful website, blog, or app.</q> <p class="demo">34% of the web uses WordPress, from hobby blogs to the biggest news sites online.</p> </body> </html>

आउटपुट

यह निम्नलिखित आउटपुट देता है:

CSS से टेक्स्ट ट्रांसफॉर्मेशन

उदाहरण

<!DOCTYPE html> <html> <head> <style> div { background-color: lightgreen; margin: auto; text-align: center; } p { width: 80%; background-color: aquamarine; text-decoration: uppercase; } article { background-color: darksalmon; text-transform: lowercase; } </style> </head> <body> <h2>What is Magento?</h2> <div> <p>Magento is an open-source e-commerce platform written in PHP.</p> <article> Build your own branded store powered by Magento Commerce and Amazon. Choose from 4,600 themes and extensions in the Magento Marketplace as well as more than 300,000 Magento developers. </article> </div> </body> </html>

आउटपुट

यह निम्नलिखित आउटपुट देता है:

CSS से टेक्स्ट ट्रांसफॉर्मेशन

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

    CSS text-indent प्रॉपर्टी हमें किसी एलिमेंट की पहली लाइन का इंडेंटेशन सेट करने में मदद करती है।सिंटैक्सCSS text-indent प्रॉपर्टी का सिंटैक्स निम्नलिखित है:Selector { text-indent: /*value*/ }उदाहरणनिम्नलिखित उदाहरण CSS text-indent प्रॉपर्टी को दर्शाते हैं।<!DOCTYPE html> <html> <head&g

  1. CSS से टेक्स्ट बटन कैसे स्टाइल करें? CSS से टेक्स्ट बटन कैसे स्टाइल करें?

    CSS का उपयोग करके विभिन्न रंगों और शैलियों के टेक्स्ट बटन बनाए जा सकते हैं। इस उदाहरण में पांच अलग-अलग प्रकार के बटन (Success, Info, Warning, Danger, Default) दिखाए गए हैं जिनमें होवर इफेक्ट भी शामिल है। उदाहरण <!DOCTYPE html> <html> <head> <meta name=viewport content=width=

  1. CSS से ग्लोइंग टेक्स्ट कैसे बनाएं? CSS से ग्लोइंग टेक्स्ट कैसे बनाएं?

    CSS से ग्लोइंग टेक्स्ट बनाने के लिए, कोड निम्नानुसार है -उदाहरण<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style>    body {       background-color: rgb(0, 0, 0);