Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <!-- Link to Google Material Icons font -->
<link
    href="https://fonts.googleapis.com/icon?family=Material+Icons"
    rel="stylesheet"
/>

<!-- Main container for the button group -->
<div class="container">
    <!-- Button group with animated menu -->
    <div class="btn-group">
        <!-- Central span for creating the '+' symbol -->
        <span></span>
        <!-- Home button -->
        <button class="btn"><i class="material-icons md-48">home</i></button>
        <!-- Settings button -->
        <button class="btn"><i class="material-icons">settings</i></button>
        <!-- Logout button -->
        <button class="btn"><i class="material-icons">logout</i></button>
        <!-- Help button -->
        <button class="btn"><i class="material-icons">help</i></button>
    </div>
</div>
              
            
!

CSS

              
                /* Reset default margin */
* {
    margin: 0;
}

/* Set background color for the body */
body {
    background: #fff;
}

/* Style for the main container */
.container {
    height: 200px;
    width: 300px;
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
}

/* Style for the button group */
.btn-group {
    height: 160px;
    width: 160px;
    border-radius: 160px;
    transform: scale(0.5);
    font-family: calibri;
    position: absolute;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.83, -0.24, 0.24, 1.31);
    background-color: #fff;
    vertical-align: middle;
}

/* Style for individual buttons */
.btn {
    height: 80px;
    width: 80px;
    float: left;
    font-size: 40px;
    line-height: 80px;
    border: none;
    background-color: #2196F3;
    color: #2196F3;
    transition: all 0.5s cubic-bezier(0.83, -0.24, 0.24, 1.31),
        background-color 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover effect for buttons */
.btn:hover {
    background-color: #64B5F6;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.15);
}

/* Style for the central span ('+' symbol) */
.btn-group > span {
    height: 60px;
    width: 60px;
    margin: 50px 50px;
    position: absolute;
}

/* Create the '+' symbol using pseudo-elements */
.btn-group > span::before,
.btn-group > span::after {
    content: "";
    background-color: #fff;
    position: absolute;
    border-radius: 10px;
}

.btn-group > span::before {
    width: 10px;
    height: 100%;
    margin: 0 25px;
}

.btn-group > span::after {
    width: 100%;
    height: 10px;
    margin: 25px 0;
}

/* Hover effect for the button group */
.btn-group:hover {
    transform: scale(0.85) rotate(45deg);
    cursor: default;
}

/* Hide the '+' symbol on hover */
.btn-group:hover > span {
    opacity: 0;
}

/* Rotate buttons and change color on hover */
.btn-group:hover > .btn {
    border-radius: 100%;
    color: #fff;
    transform: rotate(-45deg);
}

/* Set border-radius for each button to create a circular shape when combined */
.btn:nth-child(2) {
    border-radius: 80px 0 0 0;
}

.btn:nth-child(3) {
    border-radius: 0 80px 0 0;
}

.btn:nth-child(4) {
    border-radius: 0 0 0 80px;
}

.btn:nth-child(5) {
    border-radius: 0 0 80px 0;
}

/* Adjust margins for buttons on hover to create space between them */
.btn-group:hover > .btn:nth-child(2) {
    margin: -5px 5px 5px -5px;
}

.btn-group:hover > .btn:nth-child(3) {
    margin: -5px -5px 5px 5px;
}

.btn-group:hover > .btn:nth-child(4) {
    margin: 5px 5px -5px -5px;
}

.btn-group:hover > .btn:nth-child(5) {
    margin: 5px -5px -5px 5px;
}

/* Set font size for Material Icons */
.material-icons {
    font-size: 36px !important;
}

  @media screen and (max-width: 768px) {
   .container {
    top: 50%;
    left: 65%;
    
}
        }

  @media screen and (max-width: 380px) {
   .container {
    top: 50%;
    left: 70%;
    
}
        }
              
            
!

JS

              
                
              
            
!
999px

Console