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

CSS से फुल-विड्थ इमेज पर फॉर्म कैसे जोड़ें?


CSS से फुल-विड्थ इमेज पर फॉर्म जोड़ने का कोड निम्नलिखित है:

उदाहरण

<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body, html {    height: 100%;    margin: 0;    padding: 0;    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } * {box-sizing: border-box;} .backgroundImage {    height: 100%;    background-image: url("https://images.pexels.com/photos/1424246/pexels-photo-1424246.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=1000");    background-position: center;    background-repeat: no-repeat;    background-size: cover;    position: relative; } .formContainer {    position: absolute;    right: 40%;    max-width: 400px;    margin: 20px;    padding: 16px;    background-color: white; } label{    font-size: 20px;    font-weight: bolder; } input[type=text], input[type=password] {    width: 100%;    font-size: 18px;    padding: 15px;    margin: 5px 0 22px 0;    border: none;    background: #e3ff95; } input[type=text]:focus, input[type=password]:focus {    background-color: #ddd;    outline: none; } .btn-login {    background-color: #4CAF50;    color: white;    padding: 16px 20px;    border: none;    cursor: pointer;    width: 100%;    font-size: 20px; } </style> </head> <body> <div class="backgroundImage"> <form class="formContainer"> <h1>Register Here</h1> <label for="eMail">Email</label> <input type="text" placeholder="Enter your Email ID" name="eMail" required> <label for="pass">Password</label> <input type="password" placeholder="Enter your Password" name="pass" required> <label for="Address">Address</label> <input type="text" placeholder="Enter your Address" name="Address" required> <button class="btn-login">Login</button> </form> </div> </body> </html>

आउटपुट

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

CSS से फुल-विड्थ इमेज पर फॉर्म कैसे जोड़ें?


  1. CSS से रजिस्टर फॉर्म कैसे बनाएं? CSS से रजिस्टर फॉर्म कैसे बनाएं?

    रजिस्ट्रेशन फॉर्म में ईमेल, पासवर्ड, पासवर्ड कन्फर्मेशन और शर्तें स्वीकृति शामिल होती हैं। स्टैक्ड लेआउट, फोकस स्टेट, और रिस्पॉन्सिव डिज़ाइन के साथ यह एक पूर्ण रजिस्ट्रेशन अनुभव प्रदान करता है। उदाहरण <!DOCTYPE html> <html> <head> <meta name=viewport content=width=device-wid

  1. CSS से कॉन्टैक्ट फॉर्म कैसे बनाएं? CSS से कॉन्टैक्ट फॉर्म कैसे बनाएं?

    कॉन्टैक्ट फॉर्म में नाम, ईमेल, और संदेश (टेक्स्टएरिया) फील्ड होते हैं। साफ लेआउट, पीला बैकग्राउंड, हरा सबमिट बटन, और होवर इफेक्ट के साथ यह उपयोगकर्ता-अनुकूल होता है। उदाहरण <!DOCTYPE html> <html> <head> <meta name=viewport content=width=device-width, initial-scale=1> &l

  1. CSS से होवर पर ट्रांज़िशन कैसे जोड़ें? CSS से होवर पर ट्रांज़िशन कैसे जोड़ें?

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