CSS叠加效果-排除某些容器 [英] CSS Overlay Effect - Exclude certain container
本文介绍了CSS叠加效果-排除某些容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在将叠加效果应用于具有CSS的网页,如下所示:
I am applying an overlay effect to a webpage with the CSS shown here:
.jqifade{
position: relative;
background-color: #000000;
height:2315px !important; /*set to page height*/
}
此CSS使用彩色(黑色)覆盖整个网页,该颜色随后通过JS设置为30%不透明度.我想用id="noOverlay"
排除一个div,以便CSS不应用于该div.这可能吗?如果是这样...怎么办?
This CSS overlays the entire webpage with a color (black) which is later set to 30% opacity with JS. I would like to exclude a div with id="noOverlay"
so that the CSS is NOT applied to this div. Is this possible? And if so... how??
推荐答案
有可能使该特定元素的z-index高于叠加层.另外,对于覆盖层,您可能会考虑使用rgba来增强不透明度.
It may be possible to make the z-index of that certain element higher than the overlay. Also for the overlay you might consider using rgba for the opacity.
.jqifade{
position: relative;
background-color: rgba(255, 255, 255, .3);
height:2315px !important; /*set to page height*/
}
请注意与此相关的浏览器兼容性.
Just watch for browser compatibility with this.
这篇关于CSS叠加效果-排除某些容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文