HTML CSS examples for CSS Property:box-shadow
CSS3 horizontal fading drop shadow with specific stops
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> html {<!--from w w w. ja v a2 s . c o m--> padding:51px 100px; } .btn { -webkit-border-radius:0px; -webkit-border-bottom-right-radius:6px; -webkit-border-bottom-left-radius:6px; -moz-border-radius:0px; -moz-border-radius-bottomright:6px; -moz-border-radius-bottomleft:6px; border-radius:0px; border-bottom-right-radius:6px; border-bottom-left-radius:6px; font-size:25px; padding:7px 17px 8px; line-height:2; position:relative; color:Chartreuse; background-color:yellow; border-color:blue; display:inline-block; margin-bottom:0; background-image:none; border:2px solid pink; white-space:nowrap; overflow:visible; } .buttonshadow { width:100%; height:100%; position:absolute; top:0; left:-26px; } .buttonshadow:before { content:""; position:absolute; z-index:2; top:-2px; left:0; width:131%; height:6px; background:-webkit-radial-gradient(51% -4%, ellipse cover, OrangeRed, rgba(98, 98, 98, 0.0) 41%); background:radial-gradient(ellipse at 51% 0%, grey, rgba(98, 98, 98, 0) 81%); } </style> </head> <body> <button type="button" class="btn"> <span>Lorem ipsum</span> <span class="buttonshadow"></span> </button> </body> </html>