CSS Only Image Grid - Prototype

Developer
Size
2,565 Kb
Views
16,192

How do I make an css only image grid - prototype?

What is a css only image grid - prototype? How do you make a css only image grid - prototype? This script and codes were developed by Tim D on 13 November 2022, Sunday.

CSS Only Image Grid - Prototype Previews

CSS Only Image Grid - Prototype - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Only Image Grid - Prototype</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="wrapper"> <h1>CSS Only Image Grid</h1> <div class="grid"> <div class="grid__item"> <img src="https://placeimg.com/640/640/nature" alt="" /> </div> <div class="grid__item"> <img src="https://placeimg.com/640/640/nature" alt="" /> </div> <div class="grid__item"> <img src="https://placeimg.com/640/640/nature" alt="" /> </div> <div class="grid__item"> <img src="https://placeimg.com/640/640/nature" alt="" /> </div> <div class="grid__item"> <img src="https://placeimg.com/640/640/nature" alt="" /> </div> <div class="grid__item"> <img src="https://placeimg.com/640/640/nature" alt="" /> </div> <div class="grid__item"> <img src="https://placeimg.com/640/640/nature" alt="" /> </div> </div>
</div
</body>
</html>

CSS Only Image Grid - Prototype - Script Codes CSS Codes

body { background: #efefef; padding-top: 3rem; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}
h1 { font-weight: bold; font-size: 2rem; margin-bottom: 1rem; color: lightseagreen;
}
img { max-width: 100%; height: auto;
}
.wrapper { max-width: 1200px; padding-left: 30px; padding-right: 30px; margin-left: auto; margin-right: auto;
}
.grid { display: -ms-grid; display: grid; width: 100%; -ms-grid-rows: 2fr 2fr 3fr 3fr; grid-template-rows: 2fr 2fr 3fr 3fr; -ms-grid-columns: 2fr 1fr 3fr; grid-template-columns: 2fr 1fr 3fr; grid-gap: 2px;
}
@media (min-width: 1024px) { .grid { -ms-grid-rows: 1fr 1fr; grid-template-rows: 1fr 1fr; -ms-grid-columns: 1fr 2fr 1fr 1fr; grid-template-columns: 1fr 2fr 1fr 1fr; }
}
.grid__item > img { display: block; min-width: 100%; min-height: 100%; -o-object-fit: cover; object-fit: cover;
}
@media (max-width: 1023px) { .grid__item:nth-child(7n + 2) { -ms-grid-column: span 2; grid-column: span 2; -ms-grid-row: span 2; grid-row: span 2; } .grid__item:nth-child(7n + 4), .grid__item:nth-child(7n + 6) { -ms-grid-column: span 2; grid-column: span 2; }
}
@media (min-width: 1024px) { .grid__item:nth-child(7n + 2) { -ms-grid-row: span 2; grid-row: span 2; }
}
CSS Only Image Grid - Prototype - Script Codes
CSS Only Image Grid - Prototype - Script Codes
Home Page Home
Developer Tim D
Username tjdunklee
Uploaded November 13, 2022
Rating 3
Size 2,565 Kb
Views 16,192
Do you need developer help for CSS Only Image Grid - Prototype?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Tim D (tjdunklee) Script Codes
Create amazing SEO content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!