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

CSS से रिस्पॉन्सिव इमेज गैलरी कैसे बनाएं


CSS से रिस्पॉन्सिव इमेज गैलरी बनाने के लिए, आप निम्न कोड चलाकर देख सकते हैं:

उदाहरण

<!DOCTYPE html> <html>    <head>       <style>          div.myGallery {             border: 2px solid orange;          }          div.myGallery:hover {             border: 1px solid blue;          }          div.myGallery img {             width: 100%;             height: auto;          }          div.desc {             padding: 20px;             text-align: center;          }          .responsive {             padding: 0 5px;             float: left;             width: 24.99999%;          }          @media only screen and (max-width: 700px) {             .responsive {                width: 49.99999%;                margin: 5px 0;             }          }          @media only screen and (max-width: 500px) {             .responsive {                width: 100%;             }          }          .clearfix:after {             content: "";             display: table;             clear: both;          }       </style>    </head>    <body>       <div class = "responsive">          <div class = "myGallery">             <a target = "_blank" href="https://www.tutorialspoint.com/assets/videotutorials/courses/3d_animation_online_training/380_course_211_image.jpg">                <img src = "https://www.tutorialspoint.com/assets/videotutorials/courses/3d_animation_online_training/380_course_211_image.jpg" alt="3D Animation Tutorial" width="600" height="500">             </a>             <div class = "mydiv">3D Animation Tutorial></div>          </div>       </div>       <div class = "responsive">          <div class = "myGallery">             <a target = "_blank" href = "https://www.tutorialspoint.com/assets/videotutorials/courses/swift_4_online_training/380_course_210_image.jpg">                <img src = "https://www.tutorialspoint.com/assets/videotutorials/courses/swift_4_online_training/380_course_210_image.jpg" alt="Swift Video Tutorial" width="600" height="500">             </a>             <div class = "mydiv">Swift Video Tutorial</div>          </div>       </div>       <div class = "responsive">          <div class = "myGallery">             <a target = "_blank" href = "https://www.tutorialspoint.com/assets/videotutorials/courses/css_online_training/380_course_215_image.jpg">                <img src = "https://www.tutorialspoint.com/assets/videotutorials/courses/css_online_training/380_course_215_image.jpg" alt="CSS Video Tutorial" width="600" height="500">             </a>             <div class="mydiv">CSS Tutorial</div>          </div>       </div>       <div class = "clearfix"></div>    </body> </html>

  1. CSS से रिस्पॉन्सिव फ्लोटिंग एलिमेंट्स कैसे बनाएं? CSS से रिस्पॉन्सिव फ्लोटिंग एलिमेंट्स कैसे बनाएं?

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

  1. CSS से रिस्पॉन्सिव टेस्टिमोनियल्स कैसे बनाएं? CSS से रिस्पॉन्सिव टेस्टिमोनियल्स कैसे बनाएं?

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

  1. CSS से रिस्पॉन्सिव ब्लॉग लेआउट कैसे बनाएं? CSS से रिस्पॉन्सिव ब्लॉग लेआउट कैसे बनाएं?

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