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

CSS से सामान्य डिवाइस ब्रेकपॉइंट के लिए मीडिया क्वेरी का उपयोग कैसे करें?

उदाहरण

CSS का उपयोग करके सामान्य डिवाइस ब्रेकपॉइंट के लिए मीडिया क्वेरी का उपयोग करने के लिए, निम्न कोड देखें:

<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <style>    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;       color: white;    }    @media only screen and (max-width: 600px) {       body {          background: rgb(207, 60, 151);       }    }    @media only screen and (min-width: 600px) {       body {          background: rgb(0, 128, 107);       }    }    @media only screen and (min-width: 768px) {       body {          background: rgb(226, 136, 18);       }    }    @media only screen and (min-width: 992px) {       body {          background: rgb(108, 25, 185);       }    }    @media only screen and (min-width: 1200px) {       body {          background: rgb(13, 124, 63);       }    } </style> </head> <body> <h1>Typical Breakpoints Example</h1> <h2> Resize the screen to see background color change on different breakpoints </h2> </body> </html>

आउटपुट

1200px से बड़े स्क्रीन आकार पर निम्न आउटपुट होगा:

CSS से सामान्य डिवाइस ब्रेकपॉइंट के लिए मीडिया क्वेरी का उपयोग कैसे करें?

0 से 600px के बीच की स्क्रीन पर निम्न आउटपुट दिखाया जाएगा:

CSS से सामान्य डिवाइस ब्रेकपॉइंट के लिए मीडिया क्वेरी का उपयोग कैसे करें?

  1. CSS से लिस्ट के बुलेट कलर्स कैसे बदलें? CSS से लिस्ट के बुलेट कलर्स कैसे बदलें?

    CSS से लिस्ट के बुलेट कलर्स बदलने के लिए, कोड निम्नानुसार है -उदाहरण<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style>    body{       font-family: 'Segoe UI', Ta

  1. CSS से वेबसाइट के लिए अबाउट/अबाउट अस पेज कैसे बनाएं? CSS से वेबसाइट के लिए अबाउट/अबाउट अस पेज कैसे बनाएं?

    उदाहरण अबाउट पेज बनाने के लिए, निम्न कोड का उपयोग करें: <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style>    html {       box-sizing: border-box;    }  

  1. Elfeed के साथ Emacs का उपयोग RSS के लिए कैसे करें Elfeed के साथ Emacs का उपयोग RSS के लिए कैसे करें

    Emacs एक बहुत ही विस्तार योग्य सॉफ्टवेयर है। यह आपका टेक्स्ट एडिटर, आपका ईमेल क्लाइंट और यहां तक कि आपका USENET रीडर भी हो सकता है। Elfeed के साथ, आप Emacs को अपने RSS फीड रीडर के रूप में भी उपयोग कर सकते हैं। Elfeed क्या है? Elfeed Emacs के लिए लिखा गया एक हल्का लेकिन शक्तिशाली RSS फीड रीडर है। यह