Dark CSS

Button Folded Corner Hover Effects using Html and CSS

Facebook
Twitter
WhatsApp

Code preview

html Code

				
					<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <button>
        <b>Hover me</b>
    </button>
</body>
</html>
				
			

css Code

				
					* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html,
body {
    display: grid;
    height: 100%;
    place-items: center;
    background: #212121;
}

button {
    position: relative;
    font-size: 1.2em;
    padding: 0.7em 1.4em;
    background-color: #0420bf;
    text-decoration: none;
    border: none;
    cursor: pointer;
    border-radius: 0.5em;
    color: #DEDEDE;
    box-shadow: 0.5em 0.5em 0.5em rgba(0, 0, 0, 0.3);
}

button::before {
    transition: 0.3s;
    background: linear-gradient(135deg, rgba(33, 33, 33, 1) 0%, rgba(33, 33, 33, 1) 50%, rgb(4, 19, 150) 50%, rgb(4, 7, 191) 60%);
}

button::before {
    position: absolute;
    content: '';
    height: 0;
    width: 0;
    top: 0;
    left: 0;
    border-radius: 0 0 0.5em 0;
    box-shadow: 0.2em 0.2em 0.2em rgba(0, 0, 0, 0.3);
}

button:hover::before {
    width: 1.6rem;
    height: 1.6rem;
}