html学习教程6之背景

在HTML中搭配一个好的背景能够让观众更加易于阅读。

背景(Backgrounds)

<body> 拥有两个配置背景的标签。背景可以是颜色或者图像。

背景颜色(Bgcolor)

背景颜色属性将背景设置为某种颜色。属性值可以是十六进制数、RGB 值或颜色名

<body bgcolor="#000000"><body bgcolor="rgb(0,0,0)"><body bgcolor="black"> 这三种方式都是把背景颜色设置为黑色

其中第三种设置背景颜色的方法在HTML4.0中只是支持16 种颜色名

它们是:aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, yellow。

在使用颜色作为背景的同时,我们也可以使用图片作为背景:

背景(Background)

背景属性将背景设置为图像。属性值为图像的URL。如果图像尺寸小于浏览器窗口,,那么图像将在整个浏览器窗口进行复制。

<body background="clouds.gif"><body background="">所有<span style="font-family: 'Courier New', Courier, monospace;">教程</span><span style="font-family: 'Courier New', Courier, monospace;">资源来自于:</span><span style="font-family: 'Courier New', Courier, monospace;"></span>

酒般的思念,一饮就醉,醉时就用全部的热情读这忧伤的月色,

html学习教程6之背景

相关文章:

你感兴趣的文章:

标签云: