Skip to content

Instantly share code, notes, and snippets.

@wpflames
Created August 31, 2020 15:11
Show Gist options
  • Select an option

  • Save wpflames/ad86e3d793b554cceb5517afdae4bae5 to your computer and use it in GitHub Desktop.

Select an option

Save wpflames/ad86e3d793b554cceb5517afdae4bae5 to your computer and use it in GitHub Desktop.
Landing Page with CSS Animations Karate SCSS
//VARIABLES
$dark: #0d1113;
$red: #f84443;
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
section{
position: relative;
width: 100%;
min-height: 100vh;
background: $dark;
display: flex;
justify-content: space-between;
align-items: center;
&:before{
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background:$red;
clip-path: polygon(100% 0, 100% 0, 100% 100%, 55% 100%);
animation: fade-in .5s forwards ease-in;
animation-delay: .8s;
opacity: 0;
}
.content{
position: relative;
padding: 100px 50px 100px 150px;
color: white;
animation: left-in .5s forwards ease-in;
animation-delay: .3s;
opacity: 0;
h2{
font-size: 4rem;
font-weight: 800;
text-transform: uppercase;
span{
color: $red;
}
}
h3{
font-family: 'Lexend Peta', sans-serif;
font-size: 2.5rem;
margin-bottom: 30px;
}
p{
font-size: 1.2rem;
}
a{
color: white;
text-decoration: none;
font-size: 1.3rem;
border: 1px solid white;
border-radius: 5px;
padding: 10px 15px;
display: inline-block;
margin: 40px 0;
transition: .3s;
&:hover{
background: $red;
border-color: $red;
}
}
}
.imgBx{
position: relative;
padding-right: 100px;
img.cover{
width: 400px;
animation: fade-in .5s forwards ease-in;
animation-delay: 1s;
opacity: 0;
}
}
.social{
position: absolute;
bottom: 40px;
left: 150px;
display: flex;
animation: left-in .5s forwards ease-in;
animation-delay: .5s;
opacity: 0;
li{
list-style: none;
a{
text-decoration: none;
color: rgba(255,255,255,.8);
margin-right: 30px;
font-size: .9rem;
transition: .3s;
&:hover{
color: $red;
}
}
}
}
.nav{
position: absolute;
top: 40px;
left: 150px;
display: flex;
font-family: 'Lexend Peta', sans-serif;
border-left: 5px solid $red;
padding-left: 20px;
animation: left-in .5s forwards ease-in;
animation-delay: 0s;
opacity: 0;
li{
list-style: none;
a{
text-decoration: none;
color: rgba(255,255,255,.8);
margin-right: 50px;
font-size: 1.1rem;
transition: .3s;
&:hover{
color: $red;
}
&.active{
color: $red;
}
}
}
}
}
@keyframes fade-in{
0%{
opacity: 0;
}
100%{
opacity: 1;
}
}
@keyframes left-in{
0%{
transform: translateX(-200px);
}
100%{
transform: translateX(0);
opacity: 1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment