+ Animated text

* Properly responsive banner image
This commit is contained in:
shockrah 2021-10-25 16:36:09 -07:00
parent c28b6b5324
commit 0c7256d037
3 changed files with 68 additions and 10 deletions

View File

@ -23,10 +23,13 @@
</nav> </nav>
<div class="banner-container"> <div class="banner-container">
<div class="fade-in-image"> <div class="fade-in-image">
<img class="img-fluid" src="/images/banner.jpg"> <img class="fluid" src="/images/banner.jpg">
</div> </div>
<h1 class="headline">{{.Site.Title}}</h1> <div class="headline">
<h2 class="headline" style="bottom: 3%">{{.Site.Params.Description}}</h2> <h1 class="headline-title reveal-text">{{.Site.Title}}</h1>
<p class="reveal-text" style="font-size: 2rem;">{{.Site.Params.Description}}</p>
</div>
</div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -20,10 +20,10 @@ html {
.fade-in-image { .fade-in-image {
animation: fadeIn 3s; animation: fadeIn 3s;
-webkit-animation: fadeIn 5s; -webkit-animation: fadeIn 3s;
-moz-animation: fadeIn 5s; -moz-animation: fadeIn 3s;
-o-animation: fadeIn 5s; -o-animation: fadeIn 3s;
-ms-animation: fadeIn 5s; -ms-animation: fadeIn 3s;
} }
@keyframes fadeIn { @keyframes fadeIn {
0% {opacity:0;} 0% {opacity:0;}
@ -50,15 +50,70 @@ html {
100% {opacity:1;} 100% {opacity:1;}
} }
.fluid {
width: 100%;
max-height: 100vh;
object-fit: cover;
opacity: 0.6;
}
.headline { .headline {
position: absolute; position: absolute;
font-weight: bold;
font-size: 5rem;
bottom: 10%; bottom: 10%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
.headline-title {
font-size: 4rem;
font-weight: bold;
}
.reveal-text {
animation: slideIn 1.2s;
animation-delay: 750ms;
color: transparent;
animation-fill-mode: forwards;
-webkit-animation: slideIn 1.2s;
-webkit-animation-delay: 750ms;
-webkit-animation-fill-mode: forwards;
-moz-animation: slideIn 1.2s;
-moz-animation-delay: 750ms;
-moz-animation-fill-mode: forwards;
-o-animation: slideIn 1.2s;
-o-animation-delay: 750ms;
-o-animation-fill-mode: forwards;
-ms-animation: slideIn 1.2s;
}
@keyframes slideIn {
0% {color: #dcdcdc; clip-path: inset(0 100% 0 0);}
100% {color: #dcdcdc; clip-path: inset(0 0 0 0);}
}
@-moz-keyframes slideIn {
0% {color: #dcdcdc; clip-path: inset(0 100% 0 0);}
100% {color: #dcdcdc; clip-path: inset(0 0 0 0);}
}
@-webkit-keyframes slideIn {
0% {color: #dcdcdc; clip-path: inset(0 100% 0 0);}
100% {color: #dcdcdc; clip-path: inset(0 0 0 0);}
}
@-o-keyframes slideIn {
0% {color: #dcdcdc; clip-path: inset(0 100% 0 0);}
100% {color: #dcdcdc; clip-path: inset(0 0 0 0);}
}
@-ms-keyframes slideIn {
0% {color: #dcdcdc; clip-path: inset(0 100% 0 0);}
100% {color: #dcdcdc; clip-path: inset(0 0 0 0);}
}
.banner-button { .banner-button {
position: absolute; position: absolute;
bottom: 16px; bottom: 16px;