/ Published in: CSS
The following code will display a cross-browser CSS-gradients. Th add the right selector you can use rgba() for transparency.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<style type="text/css"> background-color: #000; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#bbb', endColorstr='#000'); background-image: -webkit-gradient(linear, left top, left bottom, from(#bbb), to(#000)); background-image: -webkit-linear-gradient(top, #bbb, #000); background-image: -moz-linear-gradient(top, #bbb, #000); background-image: -ms-linear-gradient(top, #bbb, #000); background-image: -o-linear-gradient(top, #bbb, #000); background-image: linear-gradient(top, #bbb, #000); </style>
URL: http://www.apphp.com/index.php?snippet=css-cross-browser-gradient