/ Published in: CSS
Generate Gradients Simply and Quicly
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* Mixin */ .quick-gradient (@origin: left, @alpha: 0.2) { background-image: -webkit-linear-gradient(@origin, rgba(0,0,0,0.0), rgba(0,0,0,@alpha)); background-image: -moz-linear-gradient(@origin, rgba(0,0,0,0.0), rgba(0,0,0,@alpha)); background-image: -o-linear-gradient(@origin, rgba(0,0,0,0.0), rgba(0,0,0,@alpha)); background-image: -ms-linear-gradient(@origin, rgba(0,0,0,0.0), rgba(0,0,0,@alpha)); background-image: linear-gradient(@origin, rgba(0,0,0,0.0), rgba(0,0,0,@alpha)); } //EXAMPLE USE body { background-color:#3F4C6B; .quick-gradient(top, 0.2); color:gold; margin: 80px; }