我如何获得HTML>身体>背景颜色>透明的? [英] How do I get `HTML > Body > Background-Color > Transparent`?

查看:112
本文介绍了我如何获得HTML>身体>背景颜色>透明的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个HTML:

<html>
    <head>
    </head>

    <body bgcolor="#FFFFFF" style="margin:0px;padding:0px;">
        <div style="width:100%; color:#000000; padding:25px; font-family: Segoe UI;font-size: 17px;">
        </div>
    </body>
</html>

我用bgcolor="#FFFFFF"设置了背景色.但是如何使它透明?

I have set the background-color with bgcolor="#FFFFFF". But how do I make this transparent?

推荐答案

HTML没有提供指定透明背景的方法(并且必须指定任何类型的背景的方法已经过时,不应使用).您可以在CSS中完成此操作.

HTML provides no means to specify a transparent background (and the means it has to specify backgrounds of any kind are obsolete and should not be used). You can do this in CSS.

body { 
    background-color: transparent;
}

这将使<html>元素的背景可见.

This will make the background of the <html> element visible.

无法使浏览器窗口透明.

There is no way to make the browser window transparent.

这篇关于我如何获得HTML&gt;身体&gt;背景颜色&gt;透明的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆