8.11前端之背景颜色
背景颜色是一个属性
标签
<Background>
作用
<body>
标签中的背景颜色(bgcolor)、背景(background)和文本(text)属性在最新的 HTML 标准(HTML4 和 XHTML)中已被废弃。
应该使用层叠样式表(CSS)来定义 HTML 元素的布局和显示属性。
实例
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>这是一个表情符号的练习Demo</title>
</head>
<body background="../Picture/Big.gif">
<h1 contenteditable="false">放大表情符号</h1>
<p contenteditable="false" style="font-size: 48px;">😍</p>
<br />
<p contenteditable="false" style="font-size: 48px;">💗</p>
<h4 contenteditable="false" style="color: blue;"></h4>
</body>
</html>
这个属性还是可以生效的