Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <img src="" alt="a lighthouse">


                @property --a { /* control the gradient rotation (no need to update) */
  syntax: "<angle>";
  initial-value: 45deg; 
  inherits: true;
@property --r {
  syntax: "<angle>";
  initial-value: 5deg; /* control the image rotation */
  inherits: true;
@property --p { /* control the color stops of the gradient (no need to update) */
  syntax: "<percentage>";
  initial-value: 0%;
  inherits: true;
img {
  --c: #bec1c9; /* the main coloration of the rotating gradient */
  width: 250px; /* the size of the image*/
  aspect-ratio: 1;
  border-radius: 25px;
  border: 4px solid #0000; /* the thickness for the rotating gradient */
  padding: 10px; /* the gap */
    conic-gradient(from var(--a),
       #0000 calc(30% - var(--p)),
       var(--c) calc(50% - var(--p)) calc(50% + var(--p)),
       #0000 calc(70% + var(--p))) border-box;
  --g: linear-gradient(#000 0 0);
    var(--g),var(--g) padding-box,
    conic-gradient(from var(--a),
       #000d calc(30% - var(--p)),
       #000  calc(50% - var(--p)) calc(50% + var(--p)),
       #000d calc(70% + var(--p))) content-box;
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  --_t: perspective(450px); /* the bigger, the better */
  animation: 4s linear infinite;
  animation-name: a,r;
  transition: --p .5s,--r .4s;
  cursor: pointer;
img:hover {
  --p: 50%;
  --r: 0deg;
  animation-play-state: paused;
@keyframes a {
  to {--a: 405deg}

@keyframes r{
  100%  {transform: var(--_t) rotate3d( 1, 1,0,var(--r))}
  12.5% {transform: var(--_t) rotate3d( 0, 1,0,var(--r))}
  25%   {transform: var(--_t) rotate3d(-1, 1,0,var(--r))}
  37.5% {transform: var(--_t) rotate3d(-1, 0,0,var(--r))}
  50%   {transform: var(--_t) rotate3d(-1,-1,0,var(--r))}
  62.5% {transform: var(--_t) rotate3d( 0,-1,0,var(--r))}
  75%   {transform: var(--_t) rotate3d( 1,-1,0,var(--r))}
  87.5% {transform: var(--_t) rotate3d( 1, 0,0,var(--r))}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-content: center;
  background: #000;