JSFiddle - React, Tailwind, and code Playground
by shirmode
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style/style.css">
</head>
<body>
<!-- main -->
<main class="main">
<!-- header -->
<header class="header">
<div class="container">
<div class="header__inner">
<div class="header__logo">
<a href="#"><img src="img/header-intro/pex-logo.png" alt="Logo"></a>
</div>
<nav class="header__nav">
<a href="#" class="header__link">About</a>
<a href="#" class="header__link">How It Works </a>
<a href="#" class="header__link">Services</a>
<a href="#" class="header__link">FAQ</a>
<a href="#" class="header__link">Contact</a>
</nav>
</div>
</div>
</header>
<!-- intro -->
<section class="intro">
<div class="container">
<div class="intro__inner">
<h1 class="intro__title">
Designs your eyeballs will thank you for
</h1>
<a href="#" class="intro__btn btn-purple">Get Started Today</a>
<div class="intro__text">
<p>
lorem ipsum dolor sit amet, consectetur
</p>
</div>
</div>
</div>
</section>
</main>
</body>
</html>
CSS
a {
color: #000;
text-decoration: none;
}
a:focus {
outline: none;
}
:root {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
body {
font-family: "Open Sans", sans-serif;
}
/* container */
.container {
max-width: 1210px;
padding: 0 15px;
margin: 0 auto;
}
/* header */
.header {
position: absolute;
top: 0;
left: 0;
right: 0;
z-index: 999;
}
.header__inner {
display: flex;
justify-content: space-between;
align-items: center;
padding: 40px 0;
border-bottom: 1px solid #58585a;
}
.header__link {
color: #ffffff;
font-size: 14px;
line-height: 1.8;
margin-left: 50px;
padding: 25px 0;
transition: border 0.1s linear;
}
.header__link:first-child {
margin-left: 0;
}
.header__link:hover {
border-bottom: 3px solid #fff;
}
/* intro */
.intro {
background: url(https://i.imgur.com/0TsrZfp.jpeg) center no-repeat;
background-size: cover;
height: 942px;
padding-top: 110px;
text-align: right;
}
.intro__inner {
max-width: 510px;
}
.intro__title {
color: #ffffff;
font-size: 50px;
line-height: 1.4;
text-align: right;
margin-bottom: 50px;
}
.intro__text {
color: #ffffff;
font-size: 12px;
line-height: 17px;
text-align: right;
margin-top: 36px;
}
/* button */
.btn-purple {
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.4);
border-radius: 30px;
background-color: #8824cd;
color: #ffffff;
font-size: 18px;
font-weight: 700;
text-align: center;
padding: 20px 60px;
}
.btn-purple:hover {
background-color: #562577;
}