Website/public/css/button.css

73 lines
2.0 KiB
CSS

.buttcontainer {
width: 100%;
/* Can be in percentage also. */
height: auto;
margin: auto;
padding: 0px 0px 20px;
position: relative;
display: flex;
justify-content: center;
}
button.btn {
cursor: var(--pointercur), pointer;
color: black;
background: #8f66d3;
border: 1px solid #000;
font-family: Heal The Web A;
font-size: 14pt;
display: inline-block;
width: 100%;
padding: 5px 15px;
border-radius: 2px;
transform-style: preserve-3d;
-webkit-transition: background 150ms cubic-bezier(0, 0, 0.58, 1), -webkit-transform 150ms cubic-bezier(0, 0, 0.58, 1);
transition: transform 150ms cubic-bezier(0, 0, 0.58, 1), background 150ms cubic-bezier(0, 0, 0.58, 1), -webkit-transform 150ms cubic-bezier(0, 0, 0.58, 1);
}
button.btn::before {
position: absolute;
content: '';
width: 100%;
height: 100%;
top: -5px;
left: -1px;
right: 0;
bottom: 0;
background: #6943ac;
border: inherit;
border-radius: inherit;
box-shadow: -5px 5px rgb(0 0 0 / 70%);
transform: translate3d(0, 0.75em, -1em);
transition: transform 15ms cubic-bezier(0, 0, 0.58, 1),
box-shadow 15ms cubic-bezier(0, 0, 0.58, 1),
-webkit-transform 150ms cubic-bezier(0, 0, 0.58, 1),
-webkit-box-shadow 150ms cubic-bezier(0, 0, 0.58, 1);
}
button.btn:hover {
background: #bb7ee5;
}
button.btn:hover::before {
background: #8f66d3;
box-shadow: -5px 5px rgb(0 0 0 / 70%), 0 0em 4px 3px rgba(255, 255, 255, 0.3);
}
button.btn:active {
background: #e695f7;
color: white;
transform: translate3d(0em, 3px, 0em);
transition: transform 15ms cubic-bezier(0, 0, 0.58, 1),
box-shadow 15ms cubic-bezier(0, 0, 0.58, 1),
-webkit-transform 150ms cubic-bezier(0, 0, 0.58, 1),
-webkit-box-shadow 150ms cubic-bezier(0, 0, 0.58, 1);
}
button.btn:active::before {
background: #bb7ee5;
-webkit-box-shadow: 0 0 0 2px #b18597, 0 0 #ffe3e2;
box-shadow: -2px 2px rgb(0 0 0 / 70%), 0 0em 4px 3px rgba(255, 255, 255, 0.3);
transform: translate3d(0, 10px, -1px);
}