How to create loading image using CSS only

Posted by admin on Tue, 02/28/2017 - 06:04

This is an easy way to create a sexy loading throbber image without image using only CSS!
Wanna get something like this using only CSS?




Well that's easy!
Just add simple HTML with two DIVs

<div class="pswp__preloader__icn">
  <div class="pswp__preloader__cut">
    <div class="pswp__preloader__donut"></div>
  </div>
</div>

Then a crazy sheet of CSS, but its not that complicated as it looks like. ;)

.pswp__preloader__icn {
  opacity:0.75;
  width: 24px;
  height: 24px;
  -webkit-animation: clockwise 500ms linear infinite;
  animation: clockwise 500ms linear infinite;
}
 
/* The idea of animating inner circle is based on Polymer loading indicator by Keanu Lee https://blog.keanulee.com/2014/10/20/the-tale-of-three-spinners.html */
.pswp__preloader__cut {
  position: relative;
  width: 12px;
  height: 24px;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
}
 
.pswp__preloader__donut {
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  border: 2px solid #000;
   border-radius: 50%;
  border-left-color: transparent;
  border-bottom-color: transparent;
  position: absolute;
  top: 0;
  left: 0;
  background: none;
  margin:0;
   -webkit-animation: donut-rotate 1000ms cubic-bezier(.4,0,.22,1) infinite;
  animation: donut-rotate 1000ms cubic-bezier(.4,0,.22,1) infinite;
}
 
@-webkit-keyframes clockwise {
  0% { -webkit-transform: rotate(0deg) }
  100% { -webkit-transform: rotate(360deg) }
}
@keyframes clockwise {
  0% { transform: rotate(0deg) }
  100% { transform: rotate(360deg) }
}
@-webkit-keyframes donut-rotate {
  0% { -webkit-transform: rotate(0) }
  50% { -webkit-transform: rotate(-140deg) }
  100% { -webkit-transform: rotate(0) }
}
@keyframes donut-rotate {
  0% { transform: rotate(0) }
  50% { transform: rotate(-140deg) }
  100% { transform: rotate(0) }
}
Tags: 
×

Hey! Don't miss a new cool stuff!

Comments

generic 5mg cia... (not verified)

Cialis Forocoches

gabapentin side... (not verified)

Cheap Viagra 50mg

buy cialis gene... (not verified)

Usa Viagra Prices

neurontin generic (not verified)

Kamagra Oral Jelly Miglior Prezzo

how does gabape... (not verified)

Viagra Senza Ricetta Come

Michaelfange (not verified)

У Нас скидки круглый год!
HoOkAh MaGic наш официальный бренд
Набрав в поисковике Вы можете посетить наш сайт
и возможно приобрести кальяны и всё для них.
Персональные скидки
Строго 18+
Дополнительные изделия в комплекте; Прочность; Стильное оформление.

venlafaxine 150... (not verified)

Cheap Propecia Usa

buy viagra onli... (not verified)

Cialis Y El Corazon

propecia vs gen... (not verified)

acheter cialis tunisie

viagra 3000mg (not verified)

Diflucan No Perscription Needed Low Cost

cheap price viagra (not verified)

Propecia Front Receding Hairline

propecia 5mg (not verified)

Ovral No Prescription

generic viagra ... (not verified)

Amoxicillin Enlarged Prostate

is.there anywhe... (not verified)

How Amoxicillin Makes U Feel

what happens if... (not verified)

Buy Priligy Dapoxetine Uk

buy fincar on line (not verified)

venta de kamagra por internet

video viagra (not verified)

brand name cialis

aclepsa buy propecia (not verified)

Purchasing Legally On Line Amoxicilina Website In Internet

ciproflaxin (not verified)

Farmacia Italia Viagra Generico

what happens if... (not verified)

Buy Propecia Online Canada

Michaelfange (not verified)

У Нас скидки круглый год!
HoOkAh MaGic наш официальный бренд
Набрав в поисковике Вы можете посетить наш сайт
и возможно приобрести кальяны и всё для них.
Персональные скидки
Строго 18+
Делаем выводы.

kamagra test reports (not verified)

Toxicity And Pathology Of Cephalexin