JSFiddle - React, Tailwind, and code Playground
HTML
<div class="div">
<button class="button">Hello</button>
</div>
<footer class="footer">This is footer</footer>
CSS
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.div {
display: flex;
justify-content: center;
align-content: center;
height: 100%;
/* position: fixed;
bottom: 0;
right: 0;
left: 0;
top: 0; */
background-color: green;
}
.button {
transition: 1s;
opacity: 1;
}
.button:hover {
/* background-color: transparent; */
opacity: 0.5;
}
.footer {
position: fixed;
bottom: 0;
height: 50px;
background-color: red;
width: 100%;
text-align: center;
color: white;
}