Keyboard Key Style 3D Button White Color #181

CSS Keyboard key style 3D button white color

Adding these style CSS buttons to your website is easier than you think. Simply copy and paste the CSS code provided with each button design into your stylesheet

Preview Button Style

You can view the default style of buttons, the disabled state mode style of buttons, and the full-width block style of the button here. Some buttons style may not display in full width format

Button style

Disabled style

Full width block style

Button Source Code HTML and CSS

Click the button below to download the source code or edit it live.
To copy this click on the icon at the top right of the code box
Button HTML
<button class="btn-181">
    <span>Button 181</span>
</button>
Button CSS
.btn-181 {
    --bg_color: #f4f5f6;
    --border_color: #888888;
    position: relative;
    padding: 0;
    width: 150px;
    height: 45px;
    border: 2px solid var(--border_color);
    outline: none;
    background-color: var(--bg_color);
    color: #000;
    border-radius: 10px;
    transition: 0.13s ease-in-out;
    font-family: Arial, Helvetica, sans-serif;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    /*** full width block ***/
    /* width: 100%; */
}

.btn-181 span {
    --span_shadow_color: #dddddd;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    box-shadow: inset 0px -8px 0px var(--span_shadow_color),
        0px -8px 0px var(--bg_color);
    border-radius: 10px;
    transition: 0.13s ease-in-out;
    z-index: 1;
    font-size: 16px;
}

.btn-181:active {
    box-shadow: none;
}

.btn-181:active span {
    box-shadow: none;
}

/*** disabled style ***/
.btn-181:disabled {
    pointer-events: none;
    opacity: .65;
    color: #7e7e7e;
    background: #dcdcdc;
    box-shadow: none;
    text-shadow: none;
}

.btn-181:disabled span {
    box-shadow: none;
    text-shadow: none;
}

/*** dark mode ***/
html.dark-mode .btn-181 {
    --bg_color: #7a7a7a;
    --shadow_color: #000000;
    --border_color: #969696;
}

html.dark-mode .btn-181 span {
    --span_shadow_color: #4a4a4a;
}