The CSS background properties define the background effects of an element.
CSS的background属性可为元素定义背景效果。
设置背景颜色 Set the background color
This example demonstrates how to set the background color for an element.
实例:
| 代码如下 | 复制代码 |
| body {background-color: yellow} h1 {background-color: #00ff00} h2 {background-color: transparent} p {background-color: rgb(250,0,255)} |
|
标题一
标题二
段落
[ 可先修改部分代码 再运行查看效果 ]
设置背景图片 Set an image as the background
This example demonstrates how to set an image as the background
实例:
| 代码如下 | 复制代码 |
| body { background-image:url('attachments/month_0612/52006129151936.jpg') } |
|
[ 可先修改部分代码 再运行查看效果 ]
重复背景图片 How to repeat a background image
This example demonstrates how to repeat a background image.
实例:
| 代码如下 | 复制代码 |
| body { background-image: url('attachments/month_0612/52006129151936.jpg'); background-repeat: repeat } |
|
[ 可先修改部分代码 再运行查看效果 ]
背景图片水平重复 How to repeat a background image only horizontally
This example demonstrates how to repeat a background image only horizontally.
实例:
| 代码如下 | 复制代码 |
body { background-image: url('attachments/month_0612/52006129151936.jpg'); background-repeat: repeat-x } |
|
[ 可先修改部分代码 再运行查看效果 ]
背景图片垂直重复 How to repeat a background image only vertically
tplink路由器默认密码是多少(tplink路由器默认密码详解)
tplink路由器默认密码怎么查看(tplink路由器默认密码查看方法)
tplink无线路由器密码怎么重置(tplink无线路由器密码重置方法)
手机如何设置tplink无线路由器密码和密码共享功能(手机设置tplink无线路由器密码和密码共享功能方法)
tplink无线路由器密码忘记了怎么办(tplink无线路由器密码忘记了解决方案)
tplogin路由器可以无线桥接么(TPLink路由器是否支持无线桥接功能)