HTML CSS examples for CSS Property:box-shadow
Triangle shadow on CSS ribbon
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> * {<!-- w ww . j a v a 2 s . c om--> margin:0px; padding:0px; } html { width:100%; height:100%; text-align:center; } .bold { font-weight:701; } #ribbon { padding:.35em 2em; margin:0; margin-top:6%; position:relative; color:Chartreuse; text-align:center; letter-spacing:0.2em; padding-top:13px; padding-bottom:13px; display:inline-block; background:yellow; z-index:100; box-shadow:8px 8px 0px -3px blue; } #content span:after { content:''; display:block; border:solid pink; border-right-color:OrangeRed; position:absolute; right:-74px; z-index:-4; bottom:-13px; } #ribbon:after { content:""; width:4.3em; bottom:-.6em; position:absolute; display:block; border:solid grey; box-shadow:0 8px 0px -3px BlueViolet; z-index:-3; } #ribbon:after { right:-5.4em; border-left-width:.76em; border-right-color:Chartreuse; } #content:after { content:""; bottom:-.6em; position:absolute; display:block; border-style:solid; border-color:yellow; z-index:-2; } #content:before { content:""; top:-.6em; transform:rotate(91deg); position:absolute; display:block; border-style:solid; border-color:blue; z-index:-2; } #content:before { left:0; border-width:.6em 0 0 .6em; } #content:after { right:0; border-width:.6em .6em 0 0; } </style> </head> <body> <div id="ribbon"> <span id="content"> <span class="bold">Lorem ipsum do</span>Lorem ipsum dolor sit amet, consectetur adipi</span> </div> </body> </html>