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.


                <div class="absCenter">
    <button class="infoButton">
        <div class="infoButton-btn">
            <span class="infoButton-btn-text">i</span>
        <div class="infoButton-container">
            <div class="infoButton-container-message">This is a message about the thing that you need to know.</div>


                @import url(',700');

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    background-color: #F6F6F6;
    height: 100vh;

*:focus {
    outline: none;

.absCenter {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

.infoButton {
    appearance: none;
    border: 0;
    background-color: transparent;
    padding: 0;
    margin: 0;
    font-size: 14px;
    position: relative;

.infoButton-btn {
    appearance: none;
    background-color: transparent;
    border: 1px solid red;
    border-radius: 10px;
    width: 20px;
    height: 20px;
    color: red;
    background-color: white;
    font-weight: 700;
    transform: rotate(-45deg);
    transition: border-radius 200ms ease-in-out;

.infoButton-btn-text {
    display: block;
    text-align: center;
    width: 20px;
    height: 20px;
    line-height: 20px;
    transform: rotate(45deg);

.infoButton-container {
    position: absolute;
    bottom: calc(-100% + 60px);
    right: 0;
    margin-right: -90px;
    transform: scale(0);
    transition: transform 0ms linear 200ms;

.infoButton-container-message {
    box-sizing: border-box;
    width: 200px;
    padding: 16px 20px;
    font-size: 14px;
    box-shadow: 0 1px 1px 0 rgba(black, 0.26);
    border-radius: 4px;
    line-height: 1.3;
    text-align: left;
    transform: translateY(10px);
    opacity: 0;
    transition: transform 200ms ease-in-out, opacity 200ms ease-in-out;
    background-color: white;

.infoButton:focus .infoButton-btn,
.infoButton_isActive .infoButton-btn {
    border-top-right-radius: 0;
    transition: border-radius 200ms ease-in-out;
    background-color: red;
    color: white;

.infoButton:focus .infoButton-container,
.infoButton_isActive .infoButton-container {
    transform: scale(1);
    transition: transform 0ms linear;

.infoButton-container-message, {
    transform: translate(0);
    opacity: 1;


                // JS for thumbnail presentation only

let mouseMoved = false;
const button = document.querySelector('.infoButton');

const mouseMoveHandler = event => {
    document.onmousemove = null;

const toggleHandler = event => {    
    const classes = button.classList;
    if (classes.contains('infoButton_isActive')) {
    } else {

document.onmousemove = mouseMoveHandler;

const loop = setInterval(toggleHandler, 1000);