Here are all the CSS codes that I used in the hero section tutorial.
Import Playball Font
<link href="https://fonts.googleapis.com/css2?family=Playball&display=swap" rel="stylesheet">
Change font and animate heading
selector .sub-text {
font-family: 'Playball', cursive !important;
font-weight: 700 !important;
}
@keyframes text-gradient-shift {
to {
background-position: 200% center;
}
}
selector .sub-text {
background-image: linear-gradient(
to right,
#8052FF 0%,
#F95FFF 50%,
#8052FF 100%
);
background-size: 200% auto;
background-clip: text;
-webkit-background-clip: text;
color: transparent;
animation: text-gradient-shift 4s linear infinite;
}
Animate reviews box
@keyframes bounceLightAndRotate {
0% {
transform: rotate(6deg) translateY(-8px);
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}
50% {
transform: rotate(6deg) translateY(0);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}
100% {
transform: rotate(6deg) translateY(-8px);
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}
}
selector {
animation-name: bounceLightAndRotate;
animation-duration: 3s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
}
Animate partner box
@keyframes bounceLightAndRotate1 {
0% {
transform: rotate(-10deg) translateY(-8px);
}
50% {
transform: rotate(-10deg) translateY(0);
}
100% {
transform: rotate(-10deg) translateY(-8px);
}
}
selector {
animation-name: bounceLightAndRotate1;
animation-duration: 3s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
}
Disable pointer and selection
selector{pointer-events: none;user-select: none;
-webkit-user-select: none; /* For older Safari/Chrome */
-moz-user-select: none; /* For Mozilla/Firefox */
-ms-user-select: none; /* For Microsoft Edge/IE */
pointer-events: none;}