Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- index.html:
- <!DOCTYPE html>
- <head>
- <title>Flexbox Layout Test</title>
- <link rel="stylesheet" href="style.css">
- </head>
- <body>
- <div class="gallery_head">
- <h2>Flexbox Gallery</h2>
- </div>
- <section class="gallery-links">
- <div class="wrapper">
- <div class="gallery-container">
- <a href="#">
- <div></div>
- <h3>Picture Title</h3>
- <p>Picture paragraph</p>
- </a>
- </div>
- <div class="gallery-container">
- <a href="#">
- <div></div>
- <h3>Picture Title</h3>
- <p>Picture paragraph</p>
- </a>
- </div>
- <div class="gallery-container">
- <a href="#">
- <div></div>
- <h3>Picture Title</h3>
- <p>Picture paragraph</p>
- </a>
- </div>
- <div class="gallery-container">
- <a href="#">
- <div></div>
- <h3>Picture Title</h3>
- <p>Picture paragraph</p>
- </a>
- </div>
- <div class="gallery-container">
- <a href="#">
- <div></div>
- <h3>Picture Title</h3>
- <p>Picture paragraph</p>
- </a>
- </div>
- <div class="gallery-container">
- <a href="#">
- <div></div>
- <h3>Picture Title</h3>
- <p>Picture paragraph</p>
- </a>
- </div>
- <div class="gallery-container">
- <a href="#">
- <div></div>
- <h3>Picture Title</h3>
- <p>Picture paragraph</p>
- </a>
- </div>
- <div class="gallery-container">
- <a href="#">
- <div></div>
- <h3>Picture Title</h3>
- <p>Picture paragraph</p>
- </a>
- </div>
- </div>
- </section>
- </body>
- style:
- * {
- margin: auto;
- padding: 0;
- border-radius: 15px;
- }
- body {
- background-color: black;
- }
- .gallery_head {
- background-color: white;
- text-align: center;
- width: 80%
- }
- .wrapper {
- width: 80%;
- Height: 100;
- background-color: white;
- display: flex;
- flex-wrap: wrap;
- flex-direction:row;
- /*flex-flow: row wrap; <-- This contains both "flex-wrap: wrap" and "flex-direction:row"*/
- justify-content:space-between;
- }
- .gallery-container a div {
- width: 100%;
- height: 235px;
- background-color: lightgrey;
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
- }
- /* Efectos tontos */
- .gallery-container a:hover {
- box-shadow: 0 0 4px rgba(0, 140, 186, 0.8);
- }
- /* Fin efectos tontos */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement