<button class="btn1">
<span class="row">
<span></span>
<span></span>
</span>
<span class="row">
<span></span>
<span></span>
</span>
</button>
<button class="btn2">
<span></span>
<span></span>
<span></span>
</button>
*,*::before,*::after{
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.btn1 {
border: none;
background: #DAEFF7;
padding: 8px;
display: flex;
border-radius: 15px;
margin: 1rem;
}
.btn1 .row span {
display: block;
background: #1D9ED9;
width: 14px;
height: 14px;
// border:1px solid #fff;
border-radius: 4px;
margin: 2px 1px;
}
.btn2 {
display: flex;
flex-direction: column;
border: none;
margin: 1rem 0;
background: transparent;
padding: 8px;
span {
height: 5px;
width: 33px;
background: #0004;
margin:3px;
border-radius: 5px;
}
}
View Compiled
document.querySelectorAll("button").forEach(item => {
item.addEventListener("click", (e)=> {
alert("Me " + item.className + " button");
})
});
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.