Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #contain {position:relative;}
- #actual-black {background-color:black}
- .overlap {
- position:absolute;top:1em;left:0;
- background-color:black; opacity:0.2;
- }
- <div id="contain">
- <div id="actual-black">The background is opaque black</div>
- <div class="overlap">This is transparent black</div>
- <div class="overlap">This is transparent black</div>
- <div class="overlap">This is transparent black</div>
- <div class="overlap">This is transparent black</div>
- </div>
- D1's opacity = 0.1
- and
- D2's opacity = 0.2
- their overlap opacity = 0.3. (can it be?)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement