css - Apply gradient on image -
here's jsfiddle.
i have transformed image , add gradient (black transparant) on it.
html :
<div class="contentwrap"> <div class="perspectivediv"> <img src="http://image.noelshack.com/fichiers/2014/34/1408372755-black-card.png" class="img" /> </div> </div>
css :
.contentwrap { margin: 0 auto; max-width: 600px; height: 100%; display: table; padding-top: 150px; } .perspectivediv{ perspective:750px; position: relative; left: 0; top: 0; } .img{ position: absolute; top: -152px; left: 25px; transform: rotatex(60deg); max-width: 250px; -webkit-box-shadow: 0 8px 6px -6px rgba(0, 0, 0, 0.8);; -moz-box-shadow: 0 8px 6px -6px rgba(0, 0, 0, 0.8);; box-shadow: 0 60px 45px -20px rgba(0, 0, 0, 0.8);; -moz-border-radius: 15px; border-radius: 16px; background: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0)); }
here kind of result need (made photoshop) :
i found how apply gradient on background image, not standard image...
is possible need ?
can me ? simple i'm beginner , didn't manage it...
Comments
Post a Comment