Today I will be teaching you how to create a clean modern button for your website using only HTML and CSS
HTML
<!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>Click Me</button>
</body>
</html>
CSS
*{
padding: 0;
margin: 0;
}
body{
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: #141824;
}
button{
height: 20vh;
width: 50vw;
font-size: 8vh;
background-color: rgba(0, 0, 0, 0);
border: none;
color: #D1E8E2;
border-radius: 5px;
outline: none;
cursor: pointer;
border-radius: 10vh;
}
button:hover{
filter: brightness(85%);
color: #FFB600;
background-color: rgba(20, 24, 36);
}
If you found this blog post helpful don’t forget to check out my other projects and if you want more content follow me on
YouTube: https://www.youtube.com/channel/UC2nxqB2usQIS2c8zwVZKWEQ
Instagram: https://www.instagram.com/coding_for_the_web/
Twitter: https://twitter.com/LearnWebCoding
Comentarios