Skip to content

Instantly share code, notes, and snippets.

@gskema
Last active November 28, 2016 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gskema/cc70625fcefb51da370e to your computer and use it in GitHub Desktop.
Save gskema/cc70625fcefb51da370e to your computer and use it in GitHub Desktop.
CSS loading overlay with a spinner
/* *spinner image not included */
.loading {
position: relative;
pointer-events: none;
cursor: not-allowed;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.loading:after {
position: absolute;
content: '';
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255,255,255,0.5) url('../img/preloader.gif') no-repeat center center;
z-index: 110;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment