laptop work merged with conflicts solved

This commit is contained in:
dqnid committed 2023-07-20 16:34:16 +02:00
commit 36ac0d18af
3 files changed
+95 -29

No files matched your search

+89 -29
View File
@@ -53,17 +53,18 @@ body {
top: 40%; top: 40%;
left: 50%; left: 50%;
transform: translate(-50%,-50%); transform: translate(-50%,-50%);
/* /*
* Limpiar animaciones para evitar temblores * Limpiar animaciones para evitar temblores
* No se sabe realmente por qué funciona o de dónde viene el error, pero lo hace * No se sabe realmente por qué funciona o de dónde viene el error, pero lo hace
*/ */
backface-visibility: hidden; backface-visibility: hidden;
text-align: center;
} }
.heading-primary { .heading-primary {
color: #fff; color: #fff;
text-transform: uppercase; text-transform: uppercase;
margin-bottom: 60px;
} }
.heading-primary-main { .heading-primary-main {
@@ -71,15 +72,10 @@ body {
font-size: 60px; font-size: 60px;
font-weight: 400; font-weight: 400;
letter-spacing: 35px; letter-spacing: 35px;
animation-name: moveInLeft; animation-name: slideLeft;
animation-duration: 1.2s; animation-duration: 1s;
animation-timing-function: ease-out; animation-timing-function: ease-in;
/*
animation-delay: 3s;
animation-count: 3;
*/
} }
.heading-primary-sub { .heading-primary-sub {
@@ -87,41 +83,105 @@ body {
font-size: 22px; font-size: 22px;
font-weight: 700; font-weight: 700;
letter-spacing: 16px; letter-spacing: 16px;
/*
animation-name: moveInRight; animation-name: slideRight;
animation-duration: 1.2s; animation-duration: 1s;
*/ animation-timing-function: ease-in;
animation: moveInRight 1.2s ease-out;
} }
@keyframes moveInLeft{ @keyframes slideLeft {
0%{ 0% {
transform: translateX(-160px);
opacity: 0; opacity: 0;
transform: translateX(-100px);
} }
80%{ 80% {
transform: translateX(20px); transform: translateX(15px);
} }
100%{ 100% {
transform: translateX(0);
opacity: 1; opacity: 1;
transform: translate(0);
} }
} }
@keyframes moveInRight{ @keyframes slideRight {
0%{ 0% {
transform: translateX(160px);
opacity: 0; opacity: 0;
transform: translateX(100px);
} }
80%{ 80% {
transform: translateX(-20px); transform: translateX(-15px);
} }
100%{ 100% {
transform: translateX(0);
opacity: 1; opacity: 1;
transform: translate(0);
} }
}
@keyframes slideBottom {
0% {
transform: translateY(50px);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
.btn:link,
.btn:visited {
text-transform: uppercase;
text-decoration: none;
padding: 15px 40px;
display: inline-block;
border-radius: 100px;
transition: all 0.2s;
position: relative;
}
.btn-animated {
animation: slideBottom 0.7s ease-out .75s;
animation-fill-mode: backwards;
}
.btn:hover {
transform: translateY(-4px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.btn:active {
transform: translateY(-1px);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}
.btn-white {
background-color: #fff;
color: #777;
}
.btn::after {
content: "";
display: inline-block;
height: 100%;
width: 100%;
border-radius: 100px;
position: absolute;
top: 0;
left: 0;
z-index: -1;
transition: all 0.4s;
}
.btn-white::after{
background-color: #fff;
}
.btn:hover::after {
transform: scaleX(1.4) scaleY(1.6);
opacity: 0;
} }
+2
View File
@@ -22,6 +22,8 @@
<span class="heading-primary-main">outdoors</span> <span class="heading-primary-main">outdoors</span>
<span class="heading-primary-sub">is where life happens</span> <span class="heading-primary-sub">is where life happens</span>
</h1> </h1>
<a href="#" class="btn btn-white btn-animated">Discover our tours</a>
</div> </div>
</header> </header>
</body> </body>
+4
View File
@@ -7,3 +7,7 @@ Hay dos tipos de animaciones:
- Con la propiedad 'transition' - Con la propiedad 'transition'
- Con keyframes - Con keyframes
- Lo ideal es solo animar con opacity y transform, porque los navegadores están optimizados para ellas dos solo. - Lo ideal es solo animar con opacity y transform, porque los navegadores están optimizados para ellas dos solo.
## Pseudo-elementos
Estados especiales de un selector (:hover, :link, etc.)
::after -> Add a virtual element 'after' el elemento