css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


Save Automatically?

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <h1>Clip-path Penrose Triangle</h1>
<div class="penrose-triangle">
  <div class="side"></div>
  <div class="side"></div>
  <div class="side"></div>

<p>The Penrose triangle, also known as the Penrose tribar, or the impossible tribar, is a triangular impossible object. It was first created by the Swedish artist Oscar Reutersvärd in 1934. The psychiatrist Lionel Penrose and his mathematician son Roger Penrose independently devised and popularized it in the 1950s, describing it as "impossibility in its purest form". It is featured prominently in the works of artist M. C. Escher, whose earlier depictions of impossible objects partly inspired it.</p>
              $side-one-color: #c71585; // mediumvioletred
$side-two-color: #8a0b84;
$side-three-color: #4b0082; // dreaming indigo

$side-hover-color: #87cefa; // lightskyblue

$body-font-family: 'Quicksand', sans-serif;
$header-font-family: 'Oswald', serif;

@keyframes rotate {
  from { transform: translate3d(-6.6vw, -3vw, 0) rotate3d(0, 0, 1, 0deg); }
  to { transform: translate3d(-6.6vw, -3vw, 0) rotate3d(0, 0, 1, 360deg); }

*:after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;

body {
  height: 100%;
  width: 100%;
html {
  font-size: 100%;
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding: 2rem;
  font: {
    family: $body-font-family;
    size: 1.3rem;
    weight: normal;

h1 {
  margin-bottom: 4rem;
  font: {
    family: $header-font-family;
    size: 4rem;
  line-height: 1.1;
  text: {
    align: center;
    transform: uppercase;

p {
  max-width: 44rem;
  margin: 4rem auto;
  font-size: 1.4rem;

.penrose-triangle {
  display: block;
  width: 20rem;
  height: 20rem;
  margin: 0 auto;
  margin-bottom: 3rem;
  position: relative;
  transform-origin: 13.3rem 11.5rem;
  animation: rotate 30s linear infinite;
  filter: drop-shadow(0 0 4rem rgba(black, 0.2));

  .side {
    display: block;
    width: 20rem;
    height: 20rem;
    position: absolute;
    clip-path: polygon(57% 0, 75% 0, 26% 85%, 89.5% 85%, 98.4% 100%, 0 100%);
    transition: background-color 1s ease;

    &:nth-of-type(1) {
      top: 0;
      left: 0;
      transform: rotate(0deg);
      background-color: $side-one-color;

    &:nth-of-type(2) {
      top: 18.3%;
      left: 43.3%;
      transform: rotate(120deg);
      background-color: $side-two-color;

    &:nth-of-type(3) {
      top: 46.5%;
      left: 5.9%;
      transform: rotate(240deg);
      background-color: $side-three-color;

    &:nth-of-type(3):hover {
      background: {
        image: url(http://aepicos.com/codepen/images/space-bg.gif);
        size: cover;
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................