Пример вывода оверлея на чистом css:
body.overlay:before {
content: '';
display: block;
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: rgba(0, 0, 0, .5);
z-index: 100;
}
Демо.
Можно добавить прелоадер:
body.preloader:after {
content: '';
display: block;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 55px;
width: 55px;
margin: auto;
background: white url(preloader.gif) no-repeat center center;
border-radius: 6px;
z-index: 101;
}
Демо.
Добавить комментарий