CSS常用属性设置
背景
CSS 背景属性用于定义HTML元素的背景效果
background-color
设置元素的背景颜色
body {
background-color:#ff0000;
}
background-image
设置元素的背景图像,默认情况下,背景图像进行平铺重复显示,以覆盖整个元素实体。
body {
background-image:url('paper.gif');
}
background-repeat
设置是否及如何重复背景图像
body {
background-image: url(img/logo.jpg);
background-repeat: no-repeat;
}
网友评论