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

CSS से वर्टिकल मेनू कैसे बनाएं?


CSS से वर्टिकल मेनू बनाने का कोड निम्नलिखित है:

उदाहरण

<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta charset="utf-8"> <style> .Menu {    width: 200px; } .links {    background-color: rgb(251, 255, 188);    color: black;    display: block;    padding: 12px;    text-decoration: none; } .links:hover {    background-color: rgb(85, 85, 85);    color:white; } .links.selected {    background-color: rgb(0, 0, 0);    color: white; } </style> </head> <body> <div class="Menu"> <a href="#" class="links selected">About Us</a> <a class="links" href="#">Social Links</a> <a class="links "href="#">Visit Us</a> <a class="links" href="#">More info</a> <a class="links" href="#">Phone Number</a> </div> </body> </html>

आउटपुट

उपरोक्त कोड निम्नलिखित आउटपुट उत्पन्न करेगा:

CSS से वर्टिकल मेनू कैसे बनाएं?


  1. CSS से चैट संदेश कैसे बनाएं? CSS से चैट संदेश कैसे बनाएं?

    CSS से चैट संदेश बनाने के लिए, कोड निम्नानुसार है -उदाहरण<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style>    body {       margin: 0 auto;       max-widt

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

    CSS से वर्टिकल लाइन बनाने के लिए, कोड निम्नानुसार है -उदाहरण<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style>    .vLine {       border-left: 6px solid rgb(128, 0, 128);

  1. CSS से सेक्शन काउंटर कैसे बनाएं? CSS से सेक्शन काउंटर कैसे बनाएं?

    उदाहरण CSS से सेक्शन काउंटर बनाने के लिए, निम्न कोड का उपयोग करें: <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font