I have this class
.box { background-color:#fff; border:3px solid #eee; }
My question is how can I set an opacity to the white background only so that it will kinda mix with my background?
Thank you.
I have this class
.box { background-color:#fff; border:3px solid #eee; }
My question is how can I set an opacity to the white background only so that it will kinda mix with my background?
Thank you.
CSS 3 introduces rgba colour, and you can combine it with graphics for a backwards compatible solution.
I think rgba is the quickest and easiest!
background: rgba(225, 225, 225, .8)
CSS 3 introduces rgba colour, and you can combine it with graphics for a backwards compatible solution.
I think this covers just about all of the browsers. I have used it successfully in the past.
#div {
filter: alpha(opacity=50); /* internet explorer */
-khtml-opacity: 0.5; /* khtml, old safari */
-moz-opacity: 0.5; /* mozilla, netscape */
opacity: 0.5; /* fx, safari, opera */
}
opacity
, that applies to the whole element. –
Stheno float: left;
to the outer div, it will wrap around the text. It acts just as normal div box would, it just has extra markup. –
Larch You can use CSS3 RGBA in this way:
rgba(255, 0, 0, 0.7);
0.7
means 70% opacity.
I would say that the easiest way is to use transparent background image.
background: url("http://musescore.org/sites/musescore.org/files/blue-translucent.png") repeat top left;
© 2022 - 2024 — McMap. All rights reserved.