Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

CSS Background Opacity - Transparency ?

Ads
banner
banner
banner
destroyer Offline referral

Posts: 430
Joined: Jul 2013
Reputation: 3

#1
Senior Member
Guys I am trying to make my div background color 50% transparent this is my CSS code:

Code:
.container{
    background-color: #252525;
}

I want this code to be as background color but not so strong as I have already mentioned I want to reduce opacity or transparency to half.
ivan Offline referral

Posts: 713
Joined: Jul 2013
Reputation: 6

#2
Senior Member
This background has color #252525 and it's 50% transparent.

Code:
.container {
background: -moz-linear-gradient(top,  rgba(37,37,37,0.5) 0%, rgba(37,37,37,0.5) 50%, rgba(37,37,37,0.5) 51%, rgba(37,37,37,0.5) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(37,37,37,0.5)), color-stop(50%,rgba(37,37,37,0.5)), color-stop(51%,rgba(37,37,37,0.5)), color-stop(100%,rgba(37,37,37,0.5)));
background: -webkit-linear-gradient(top,  rgba(37,37,37,0.5) 0%,rgba(37,37,37,0.5) 50%,rgba(37,37,37,0.5) 51%,rgba(37,37,37,0.5) 100%);
background: -o-linear-gradient(top,  rgba(37,37,37,0.5) 0%,rgba(37,37,37,0.5) 50%,rgba(37,37,37,0.5) 51%,rgba(37,37,37,0.5) 100%);
background: -ms-linear-gradient(top,  rgba(37,37,37,0.5) 0%,rgba(37,37,37,0.5) 50%,rgba(37,37,37,0.5) 51%,rgba(37,37,37,0.5) 100%);
background: linear-gradient(to bottom,  rgba(37,37,37,0.5) 0%,rgba(37,37,37,0.5) 50%,rgba(37,37,37,0.5) 51%,rgba(37,37,37,0.5) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#80252525', endColorstr='#80252525',GradientType=0 );
}
destroyer Offline referral

Posts: 430
Joined: Jul 2013
Reputation: 3

#3
Senior Member
Thanks Ivan works great +1 from me Smile I wasn't really expecting so much CSS code.
surenot Offline referral

Posts: 500
Joined: Jan 2014
Reputation: 16

#4
Senior Member
Have you tried using CSS3 opacity property?

Code:
.something {
opacity: 0.5;
}





User(s) browsing this thread: 1 Guest(s)