为什么我不能在HTML标记中同时使用bgcolor和background属性 [英] Why I cannot use both bgcolor and background properties together in the tag of HTML

查看:64
本文介绍了为什么我不能在HTML标记中同时使用bgcolor和background属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<html>
<head>
<title>HTML 4.01 Tag Reference</title>
</head>

<body bgcolor="red" text="blue" background="C:\Users\tanuj_gyan\Pictures\Good Morning\9129_21167.jpg" bgcolor="red">
Hello
</body>
</html>


每当我执行上述代码时,背景图像就会覆盖整个空间,而背景色则根本看不到.


Whenever I am executing the above code the background image is covering the entire space and background color is not at all visible. Kindly help!

推荐答案

您应该忘记所有这些属性,而只能使用CSS.不要继续生活在石器时代.

CSS!
http://en.wikipedia.org/wiki/CSS [ http://www.w3.org/Style/CSS/ [
You should forget all such attributes and use CSS only. Don''t keep living in stone age.

CSS!
http://en.wikipedia.org/wiki/CSS[^],
http://www.w3.org/Style/CSS/[^].

—SA




您可以使用样式表同时使用这两种东西.

请查看
Hi,

you can use both stuffs using style sheet.

Please look into this


这篇关于为什么我不能在HTML标记中同时使用bgcolor和background属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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