sleep pulse animation

by jorgeluis

HTML

<div class="screen">
  <img src="https://placehold.it/200x140">
</div>

CSS

body {
  background-color: #333;
}

.screen {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #111;
  background-image: linear-gradient(110deg, rgba(45,45,45,1), rgba(20,20,20,1));
  height: 140px;
  width: 200px;
}

.screen img {
  position: relative;
}
.screen p {
  color: rgba(255, 255, 255, 0.5);
}

.screen:before {
  content: " ";
  position: absolute;
  bottom: 20%;
  right: 20%;
  width: 12px;
  height: 12px;
  border-radius: 10px;
  background-color: #8dda4b;
  animation: sleep 10s linear infinite;
}

@keyframes sleep {
	0%, 60%, 100% {
		opacity: 0.2;
		box-shadow: none;
	}
	30% {
		opacity: 0.6;
		box-shadow: 0 -2px 8px, 0 0 2px, 0 0 5px #defde7, 0 0 15px #b9f391, 0 0 2px #fff;
	}
}