JSFiddle - React, Tailwind, and code Playground

by Qwerty_Wasd

HTML

<header>
        <div class="slider">
                <img src="https://st2.depositphotos.com/1001951/6825/i/450/depositphotos_68253005-stock-photo-man-with-conceptual-spiritual-body.jpg">
        </div>
 
                <img class="mySlides" src="https://st2.depositphotos.com/1001951/6825/i/450/depositphotos_68253005-stock-photo-man-with-conceptual-spiritual-body.jpg">
                <img class="mySlides" src="https://st2.depositphotos.com/1001951/6825/i/450/depositphotos_68253005-stock-photo-man-with-conceptual-spiritual-body.jpg">
                <img class="mySlides" src="https://st2.depositphotos.com/1001951/6825/i/450/depositphotos_68253005-stock-photo-man-with-conceptual-spiritual-body.jpg">
        <div class="container-header">
            <div class="logo">
                <a href="index.html"><img src="https://www.gravatar.com/avatar/862b24970f24fbc5ba0f022c28b3854e?s=64"></a>
            </div>
                <nav id="myNav">
                    <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
                    <ul>
                        <li>
                            <a href="index.html">Home</a>
                        </li>
                        <li>
                            <a href="#">Products</a>
                        </li>
                        <li>
                            <a href="#">Export</a>
                        </li>
                        <li>
                            <a href="#">Achievement</a>
                        </li>
                        <li>
                            <a href="#">Publication</a>
                        </li>
                    </ul>
                </nav>
                <div class="icon">
                            <a href="javascript:void(0);"onclick="openNav()">☰</a>
                        </div>
        </div>
    </header>

CSS

*{
    font-family: 'Ubuntu', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
 
h1{
    font-style: bold;
    font-weight: 700;
}
 
p{
    font-weight: 300;
}
 
a{
    font-weight: 400;
    text-decoration: none;
}
 
header{
    position: relative;
    background: #e3cccf;
    height: 100vh;
    width: 100%;
}
 
.container-header{
    position: absolute;
    width: 90%;
    top:0;
    left: 5%;
}
 
.slider{
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
}
 
.logo{
    margin-top: 8px; 
    width: 170px;
    height: 56px;
    float: left;
}
 
nav{
    float: right;
    margin-top: 43px;
}
 
li{
    display: inline-block;
    list-style-type: none; 
    padding-right: 5px; 
 
}
 
li a{
    text-decoration: none;
    text-transform: uppercase;
    color: #fff;
    font-size: 14px;
    text-align: center;
    padding: 8px 15px;
}
 
li a:hover{
    background: #0fd3f4;
    border-radius: 5px;
    color: #000;
    font-weight: 700;
    transition: .5s;
}
 
li:last-child{
    padding-right: 0px; 
}
 
.icon{
    display: none;
}
 
.closebtn{
    display: none;
}
 
section{
    background: #16d2f4;
}
 
.mySlides{
    width: 100%;
    height: 100vh;
    object-fit: cover;
}
 
@media screen and (max-width: 768px){
        .slider{
        position: absolute;
        top: 45%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
 
        .slider img{
            max-width: 300px;
    }
 
        .logo{
        margin-top: 8px; 
        width: 170px;
        height: 56px;
        margin-left: 50%;
        transform: translate(-50%);
    }
 
 
    .icon {
        position:absolute;
        top: 30px;
        left:95%;
        display: block;
    }
 
    .icon a{
        color: #000;
        font-size: 30px;
    }
 
    nav{
        height: 0;
        width: 100%;
        position: fixed;
        z-index: 1;
        top:-43px;
        left: 0;
        background-color: rgb(0,0,0);
       ...