透明表单背景 HTML

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9657324/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 23:03:24  来源:igfitidea点击:

Transparent Form Background HTML

htmlcssforms

提问by steven

So I'm using this form from this site here

所以我在这里使用这个网站的这个表格

When I post the form in my website the entire form area is white background. Yet I keep looking through the code and I don't see anything specifying the color. Is there a way to make it so that it has an opacity of 0 or anything of the like? Thanks in advance.

当我在我的网站上发布表单时,整个表单区域都是白色背景。但是我一直在查看代码,但没有看到任何指定颜色的内容。有没有办法让它的不透明度为0或类似的?提前致谢。

回答by dotoree

Use this css rule:

使用这个 css 规则:

#my_form
{
background-color: transparent;
}

回答by Greg

Background color is the answer as previously posted by dotoree however as a side tip, use this CSS class to change the opacity of a div.

背景颜色是 dotoree 之前发布的答案,但作为小提示,使用此 CSS 类更改 div 的不透明度。

.transparent {
zoom: 1;
filter: alpha(opacity=50);
opacity: 0.5;
}

回答by Vin Lacey

I would go with a rgba value for the background color.

我会为背景颜色使用 rgba 值。

background: rgba(255,255,255,0.5);- white with a 50% transparency.

background: rgba(255,255,255,0.5);- 白色,透明度为 50%。