Rotating Shadow
<div>
  <h2>Rotating Shadow</h2>
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
  <a href="javascript:void(0);">button</a>
</div>
*:not(head, script, svg, svg *),
*:not(head, script, svg, svg *)::before,
*:not(head, script, svg, svg *)::after {
  all: unset;
  box-sizing: border-box;
  font-family: sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  margin: 0;

  backface-visibility: hidden; /* Force GPU Usage */
}

div {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80vmin;
  height: 80vmin;
  background: white;
  padding: 5vmin;
  border-radius: 2vmin;
}

div h2 {
  font-size: 6vmin;
  line-height: 110%;
  font-weight: 600;
  color: black;
  text-align: center;
}

div p {
  font-size: 4vmin;
  line-height: 150%;
  font-weight: 400;
  color: black;
  padding-left: 8vmin;
  border-left: 2px solid navy;
  margin: 6vmin 0;
}

div a {
  font-size: 3vmin;
  background-color: navy;
  color: white;
  font-weight: 500;
  letter-spacing: 1px;
  padding: 2vmin 4vmin;
}

a:hover {
  cursor: pointer;
}

a:focus {
  outline: 1px dotted gray;
}

a:active {
  transform: scale(0.98);
}

div::before {
  position: absolute;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  background: white;
  border-radius: 100%;
  filter: drop-shadow(15vmin 15vmin 22vmin navy);
  transform-box: fill-box;
  -webkit-transform-box: fill-box;
  transform-origin: center;
  -webkit-transform-origin: center;
  content: "";
  z-index: -10;
  animation: shadowRotate 5s linear infinite;
}

@keyframes shadowRotate {
  to {
    transform: rotateZ(360deg);
  }
}
/* ESLint rules https://eslint.org/docs/2.0.0/rules/ */
/* eslint no-undef: "off" */

Rotating Shadow

  • Archivos
  • Index
  • Style
  • Script
  • README
  • CDN Agregar
HTML
PLEASE WAIT...