Created
November 22, 2018 12:00
-
-
Save martinratinaud/d3f01d21392a9bd6cf3e4faa188beec6 to your computer and use it in GitHub Desktop.
Improve first contentful paint in react
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="root"> | |
<div class="full-page-loader"> | |
<img width="200" src="/logo/aiptrade-vertical-color-color.png" alt="AIP.Trade logo" /> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.full-page-loader { | |
display: flex; | |
align-items: center; | |
flex-direction: column; | |
justify-content: center; | |
position: absolute; | |
top: 0; | |
right: 0; | |
left: 0; | |
bottom: 0; | |
} | |
.full-page-loader > img { | |
animation: 1.8s infinite heartbeat; | |
} | |
@keyframes heartbeat { | |
0% { transform: scale(1); } | |
25% { transform: scale(1.05); } | |
50% { transform: scale(1); } | |
75% { transform: scale(1.05); } | |
100% { transform: scale(1); } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment