- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Semi-Transparent Shadow</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<button class="btn btn1" type="button">Feed</button>
<button class="btn btn2" type="button">Chase</button>
</body>
</html>
CSS
.btn1 {
box-shadow: 0 0 0 15px #27ae60;
}
.btn2 {
box-shadow: 0 0 0 15px #e74c3c;
}
body {
padding-top: 200px;
background: url("muffin.jpg") no-repeat 40% 0;
background-size: auto 700px;
font-size: 18px;
font-family: "Tahoma", sans-serif;
}
.btn {
display: block;
margin: 50px auto;
padding: 15px 20px;
width: 150px;
border: none;
box-sizing: content-box;
background-color: #2c3e50;
color: white;
text-align: center;
text-transform: uppercase;
font: inherit;
}
You’ve gone to a different page
Goalscompleted
0
- Change the color of the first button’s shadow to
rgba(39, 174, 96, 0.5)
. - Change the color of the second button’s shadow to
rgba(231, 76, 60, 0.5)
.
Comments