Skip to content

Instantly share code, notes, and snippets.

@anak10thn
Forked from anonymous/jsbin.IgiBUSUP.css
Created December 27, 2013 10:18
Show Gist options
  • Save anak10thn/8145007 to your computer and use it in GitHub Desktop.
Save anak10thn/8145007 to your computer and use it in GitHub Desktop.
.box{
background: url(http://i.imgur.com/R8Vnu2j.png?1) center;
height:384px;
width:100%;
}
.shd{
position:relative;
}
.shd:before{
background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 66%, rgba(0,0,0,0.38) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(66%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.38))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 66%,rgba(0,0,0,0.38) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 66%,rgba(0,0,0,0.38) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 66%,rgba(0,0,0,0.38) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 66%,rgba(0,0,0,0.38) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#61000000',GradientType=0 ); /* IE6-9 */
position: absolute;
content: "";
left: 0px;
width: 100%;
height:100%;
}
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<div class="box shd"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment