JSFiddle - React, Tailwind, and code Playground
by maoraver
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Styling Excercise</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles/Maccabi.css">
</head>
<body>
<h1>Maccabi Haifa Football Club</h1>
<main class="container">
<figure class="picture-group">
<figcaption>Just fun</figcaption>
<img src="./images/maccabi.jpg" alt="Maccabi_Fun" class="fun">
<section class="overlay">
<section class="text1"><p>Just Fun</p></section>
</section>
</figure>
<figure class="picture-group">
<figcaption>Love</figcaption>
<img src="./images/maccabi1.jpg" alt="Maccabi_Love" class="love">
<section class="overlay"></section>
<section class="text2"><p>Love</p></section>
</figure>
<figure class="picture-group">
<figcaption>Dolev&Cherry</figcaption>
<img src="./images/maccabi2.jpg" alt="Dolev&Cherry" class="doch">
<section class="overlay"></section>
<section class="text3"><p>Dolev and Cherry</p></section>
</figure>
<figure class="picture-group">
<figcaption>Celebrate</figcaption>
<img src="./images/maccabi3.jpg" alt="Celebrate" class="celeb">
<section class="overlay"></section>
<section class="text4"><p>Celebrate</p></section>
</figure>
<figure class="picture-group">
<figcaption>Yoga</figcaption>
<img src="./images/maccabi4.jpg" alt="Yoga" class="yoga">
<section class="overlay"></section>
<section class="text5"><p>Yoga</p></section>
</figure>
<figure class="picture-group">
<figcaption>Nikita</figcaption>
<img src="./images/maccabi5.jpg" alt="Nikita" class="niki">
<section class="overlay"></section>
<section...
CSS
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root{
font-size: 2rem;
text-transform: uppercase;
background-color: green;
}
footer{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: auto;
background-color: rgb(43, 39, 39);
opacity: 0.8;
color: ivory;
}
.container{
max-width: 800px;
margin-top: 50px;
margin-bottom: 100px;
display: flex;
flex-wrap: wrap;
margin: auto;
background-color:rgb(192, 188, 188);
}
.picture-group{
text-align: center;
flex: 1 1 50%;
}
h1{
text-transform: uppercase;
text-align: center;
}
@media (max-width: 600px) {
:root {
font-size: 50%;
}
}
img {
height: 300px;
width: 300px;
}
/* .overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
opacity: 0;
transition: .5s ease;
background-color: #008CBA;
} */
/* .picture-group:nth-child(1):hover .text1 {
opacity: 0.5;
} */
/* .picture-group:hover .overlay {
opacity: 0.5;
} */
/*
.text1, .text2, .text3, .text4, .text5, .text6 {
color: white;
font-size: 20px;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
text-align: center;
} */