Skip to content

Instantly share code, notes, and snippets.

@oze4
Created February 9, 2019 23:55
Show Gist options
  • Save oze4/c4f87f6f83630850fabc5e4426874952 to your computer and use it in GitHub Desktop.
Save oze4/c4f87f6f83630850fabc5e4426874952 to your computer and use it in GitHub Desktop.
v-cloak for vue.js loading
[v-cloak] {
display: block;
padding: 50px 0;
}
@keyframes spinner {
to {
transform: rotate(360deg);
}
}
[v-cloak]:before {
content: "";
box-sizing: border-box;
position: absolute;
top: 50%;
left: 50%;
width: 20px;
height: 20px;
margin-top: -10px;
margin-left: -10px;
border-radius: 50%;
border: 2px solid #ccc;
border-top-color: #333;
animation: spinner 0.6s linear infinite;
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
[v-cloak]>* {
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment