Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

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

Packages

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.

Behavior

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.

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.

HTML

              
                    <div class="image-indicators">
        <input type="checkbox" class="point" id="point-1" name="point" value="1">
        <input type="checkbox" class="point" id="point-2" name="point" value="2">
        <input type="checkbox" class="point" id="point-3" name="point" value="3">
        <input type="checkbox" class="point" id="point-4" name="point" value="4">
        <label for="point-1" id="label-1" >
            <span>
                <span></span>
            </span>
        </label>
        <label for="point-2" id="label-2" >
            <span>
                <span></span>
            </span>
        </label>
        <label for="point-3" id="label-3">
            <span>
                <span></span>
            </span>
        </label>
        <label for="point-4" id="label-4">
            <span>
                <span></span>
            </span>
        </label>
        <img src="https://www.musee-histoire-marseille-voie-historique.fr/sites/default/files/frontpage_intro_slides/file/m0918-2006.1.1.jpg">
        <div class="description">
            <div>
                <p>La peste à la Tourette représentant le chevalier Roze et les échevins, huile sur toile, 1755, collection Musée d'Histoire de Marseille.</p>
            </div>
            <div>
                <p>Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil</p>
                <p>impedit quo minus id quod maxime placeat facere possimus.</p>
            </div>
            <div>
                <p>Proin nunc sem, pretium vehicula erat vitae, pulvinar faucibus lectus.</p>
                <p>Curabitur ullamcorper elementum augue, ac tristique lacus commodo.</p>
            </div>
            <div>
                <p>Aliquam euismod, leo nec efficitur aliquet, neque nulla volutpat mi </p>
                <p>eget pretium mauris ligula vel semper.</p>
            </div>
            <div>
                <p>Mauris posuere, mauris in ultricies, neque nulla volutpat mi </p>
                <p>eget pretium mauris ligula vel semper.</p>
            </div>
        </div>
    </div>
<a class="twitter" target="_top" href="https://twitter.com/narohan_"><svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" viewBox="0 0 72 72"><path d="M67.812 16.141a26.246 26.246 0 0 1-7.519 2.06 13.134 13.134 0 0 0 5.756-7.244 26.127 26.127 0 0 1-8.313 3.176A13.075 13.075 0 0 0 48.182 10c-7.229 0-13.092 5.861-13.092 13.093 0 1.026.118 2.021.338 2.981-10.885-.548-20.528-5.757-26.987-13.679a13.048 13.048 0 0 0-1.771 6.581c0 4.542 2.312 8.551 5.824 10.898a13.048 13.048 0 0 1-5.93-1.638c-.002.055-.002.11-.002.162 0 6.345 4.513 11.638 10.504 12.84a13.177 13.177 0 0 1-3.449.457c-.846 0-1.667-.078-2.465-.231 1.667 5.2 6.499 8.986 12.23 9.09a26.276 26.276 0 0 1-16.26 5.606A26.21 26.21 0 0 1 4 55.976a37.036 37.036 0 0 0 20.067 5.882c24.083 0 37.251-19.949 37.251-37.249 0-.566-.014-1.134-.039-1.694a26.597 26.597 0 0 0 6.533-6.774z"></path></svg></a>
              
            
!

CSS

              
                :root {
    --point-1-top: 220px;
    --point-1-left: 120px;

    --point-2-top: 20px;
    --point-2-left: 220px;

    --point-3-top: 130px;
    --point-3-left: 10px;

    --point-4-top: 155px;
    --point-4-left: 260px;

    --point-width: 15px;
    --point-height: 15px;

    --point-1-scale: 5;
    --point-2-scale: 3;
    --point-3-scale: 5;
    --point-4-scale: 4;
}

.description p { 
    margin: 0;
    font-size: 12px;
    z-index: -1;
    color: #ffffff;
}

.image-indicators img {
    width: 100%;
    border-radius: 10px;
    transition: width 0.4s ease, transform 0.4s ease;
}

.image-indicators {
    position: relative;
    width: 400px;
    border-radius: 10px;
    overflow: hidden;
    font-size: 0;
    margin: auto;
}

.image-indicators label {
    display: flex;
    position: absolute;
    cursor: pointer;
    transition-property: opacity;
    transition-duration: 300ms;
    transition: opacity 0.3s ease-out .5s;
    z-index: 1;
}

.image-indicators>label>span {
    background-color: #2196f3;
    width: 10px;
    height: 10px;
    border-radius: 60px;
    transform: scale(1);
}

.image-indicators>label>span>span {
    display: inline-block;
    vertical-align: 20px;
    background-color: rgba(33, 150, 243, 1);
    width: 10px;
    height: 10px;
    transform: scale(0);
    border-radius: 60px;
    animation: scaleGrow 3s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    animation-play-state: running;
}

@keyframes scaleGrow {
    from {
        transform: scale(0);
        background-color: rgba(33, 150, 243, 1);
    }
    to {
        transform: scale(3);
        opacity: 0;
        
    }
}

@keyframes scaleDecreases {
    from {
        transform: scale(1);
    }

    50% {
        transform: scale(0.9);
    }

    to {
        transform: scale(1);
    }
}

.point {
    position: absolute;
    width: 10px;
    height: 10px;
    cursor: pointer;
    opacity: 0;
    z-index: 2;
    transition-property: width, height, left, top;
    transition-delay: 650ms;
}

.point:checked {
    top: -50% !important;
    left: -50% !important;
    width: 200%;
    height: 200%;
    z-index: 9;
}

.point:checked ~ label {
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    transition: opacity 0.3s ease-out 0s;
} 


.description {
    position: relative;
    height: 45px;
    overflow: hidden;
    border-radius: 10px;
    padding: 10px 20px;
    margin: 1px 10px 10px;
    color: black;
    z-index: 1;
}

.description div {
    display: none;
}

.description div:first-child {
    display: block;
    opacity: 1;
    transition-property: opacity;
    transition-duration: 300ms;
    transition: opacity 0.3s ease-out .5s;
}

.description div:first-child p {
    color: #000000;
}

.description p {
    line-height: 18px;
}

.point:checked ~ .description {
    background: rgb(191 191 191 / 30%);
    backdrop-filter: blur( 15px );
    -webkit-backdrop-filter: blur( 15.0px );
    border: 1px solid rgba( 255, 255, 255, 0.18 );
}

@for $i from 1 through 4 {
    $value: $i + 1;

    #label-#{$i} {
        top: var(--point-#{$i}-top);
        left: var(--point-#{$i}-left);
    }
    
    #point-#{$i} {
        left:var(--point-#{$i}-left);
        top: var(--point-#{$i}-top);
    }

    #point-#{$i}:checked ~ img {
        transform-origin: calc(var(--point-#{$i}-left)) calc(var(--point-#{$i}-top));
        transform: scale(var(--point-#{$i}-scale));
    }
    
    #point-#{$i}:hover ~ img {
        transform-origin: calc(var(--point-#{$i}-left)) calc(var(--point-#{$i}-top));
    }

    #point-#{$i}:checked ~ .description div:first-child {
        height: 0;
        opacity: 0;
        transition: opacity 0s ease-out 0s;
    }
    #point-#{$i}:checked ~ .description div:nth-child(#{$value}) {
        display: block;
    }
    
    #point-#{$i}:checked ~ .description div:nth-child(#{$value}) p:first-child {
        width: 0;
        opacity: 0;
        white-space: nowrap;
        overflow: hidden;
        -webkit-animation: type2 2s steps(40, end);
        animation: type2 2s steps(40, end);
        -webkit-animation-fill-mode: forwards;
        animation-fill-mode: forwards;
        animation-play-state: paused;
        -webkit-animation-delay: .5s;
        animation-delay: .5s;
        animation-play-state: running;
    }
    
    #point-#{$i}:checked ~ .description div:nth-child(#{$value}) p:nth-child(2) {
        width: 0;
        opacity: 0;
        white-space: nowrap;
        overflow: hidden;
        -webkit-animation: type2 2s steps(40, end);
        animation: type2 2s steps(40, end);
        -webkit-animation-fill-mode: forwards;
        animation-fill-mode: forwards;
        animation-play-state: paused;
        -webkit-animation-delay: 2.5s;
        animation-delay: 2.5s;
        animation-play-state: running;
    }
}

@-webkit-keyframes type2 {
  0% {
    width: 0;
  }
  1% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    width: 100%;
    border: none;
  }
}


// layout
body {
    display: flex;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
    background-color: #ececec;
}

body .twitter {
    position: fixed;
    display: block;
    right: 64px;
    bottom: 14px;
}

body .twitter svg {
    width: 32px;
    height: 32px;
    fill: #1da1f2;
}
              
            
!

JS

              
                
              
            
!
999px

Console