Make a neumorphism button in CSS


In this tutorial, I will show you how to Make a Beautiful Neumorphic button in HTML and CSS

HTML code


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>NeuMorphism box</title>
    <link rel="stylesheet" href="main.css">
</head>
<body>

    <div class="container">
        <button>BUTTON</button>
    </div>

</body>
</html>

CSS code

*{
    margin0;
    padding0;
    outline0;
}
body{
    background#212121;
}
.container{
    positionabsolute;
    left50%;
    top50%;
    transformtranslate(-50%,-50%);
}

.container button{
    width400px;
    padding30px 0;
    border-radius8px;
    bordernone;
    border-radius50px;
    backgroundlinear-gradient(145deg#1e1e1e#232323);
    box-shadow:  20px 20px 47px #0d0d0d
                 -20px -20px 47px #353535;
    color#fafafa;
    transitionall 0.3s ease-out;
    font-size26px;
    font-family'Segoe UI'sans-serif;
    font-weightbold;
    letter-spacing6px;
    text-aligncenter;
}
.container button:active{
    
    color#fafafa;
    border-radius50px;
backgroundlinear-gradient(145deg#232323#1e1e1e);
box-shadow:  20px 20px 47px #0d0d0d
             -20px -20px 47px #353535;
}


Make a neumorphism button in CSS Make a neumorphism button in CSS Reviewed by Medics on April 13, 2020 Rating: 5

1 comment:

  1. Thank You so much. I am trying to create static html page

    ReplyDelete

-->
Powered by Blogger.