Shadow Buttons
Create button shadow using the box-shadow property
Sample code: To create button shadow of HTML button
<!DOCTYPE html>
<html>
<head>
<style>
.button
{
background-color: green;
border: none;
color: white;
padding: 14px 28px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 14px;
margin: 4px 2px;
cursor: pointer;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
}
.button1 { box-shadow: 0 10px 20px 0 rgba(0,0,0,0.3), 0 6px 20px 0 rgba(0,0,0,0.2); }
.button2:hover { box-shadow: 0 14px 20px 0 rgba(0,0,0,0.35),0 17px 50px 0 rgba(0,0,0,0.2); }
</style>
</head>
<body>
<h2>Shadow Buttons</h2>
<p>Create button shadow using the box-shadow property</p>
<button class="button button1">Shadow Button</button>
<button class="button button2">Shadow on Hover</button>
</body>
</html>
<html>
<head>
<style>
.button
{
background-color: green;
border: none;
color: white;
padding: 14px 28px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 14px;
margin: 4px 2px;
cursor: pointer;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
}
.button1 { box-shadow: 0 10px 20px 0 rgba(0,0,0,0.3), 0 6px 20px 0 rgba(0,0,0,0.2); }
.button2:hover { box-shadow: 0 14px 20px 0 rgba(0,0,0,0.35),0 17px 50px 0 rgba(0,0,0,0.2); }
</style>
</head>
<body>
<h2>Shadow Buttons</h2>
<p>Create button shadow using the box-shadow property</p>
<button class="button button1">Shadow Button</button>
<button class="button button2">Shadow on Hover</button>
</body>
</html>
No comments:
Post a Comment