gpt4 book ai didi

css - 背景色透明显示为白色

转载 作者:太空宇宙 更新时间:2023-11-04 08:21:09 27 4
gpt4 key购买 nike

我遇到背景色透明显示为白色的问题

这是一个示例页面: http://www.kurzweilai.net/ray-kurzweil-reveals-plans-for-linguistically-fluent-google-software?utm_source=KurzweilAI+Weekly+Newsletter&utm_campaign=0ad261ad5e-UA-946742-1&utm_medium=email&utm_term=0_147a5a48c1-0ad261ad5e-281975877

中间一列是div 'wrapper'

具有以下样式:background: url('../images/layout/bg_wrapper.gif') 0 0 repeat-y;

如果我转到控制台并输入:

x=document.getElementById('wrapper'); 
window.getComputedStyle(x, null).getPropertyValue('background-color');

我得到:

"rgba(0, 0, 0, 0)"

然而它显示它的背景为白色而不是主体颜色(黄绿色)。

这是为什么?

谢谢!

最佳答案

您有三层:body、#wrapper 和#wrapper-1。 #wrapper 的背景是重复的bg_wrapper.gif,而#wrapper-1 的背景是重复的bg_wrapper_1.gif,所以最后你看到了gif 的颜色。如果想看到 body 背景,您需要删除 gif。

关于css - 背景色透明显示为白色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45527747/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com