复习-css边框和背景属性

css边框和背景属性

border:所有边框属性

border-width:四条边框的宽度

border-style:设置边框样式,主要有dotted、solid、double

border-color:设置四条边框的颜色

border-left:在一个生命中设置所有左边框属性,对应还有border-right

border-left-color:左边框颜色,对应还有border-right-color

border-left-style:左边框样式,对应还有border-right-style

border-left-width:控制左边框宽度。对应还有border-top-width,border-bottom-style等

background:设置背景属性

background-attachment:设置背景图像是否固定或者随着页面的其余部分滚动,主要有fixed、scroll

background-color:设置元素的背景颜色

background-image:设置元素的背景图像。主要有url和none两个属性。

background-position:设置背景图像的开始位置。可以指定top left等,也可以指定具体的像素位置

background-repeat:设置是否及如何重复背景图像,主要有repeat、repeat-x,repeat-y,no-repeat

style{
body{
background-image:url(bg3.jpg);
background-repeat:no-repeat;
background-position:200px 25px;
}
}

style{ .three{width:200px;height:300px;
border:2px red dashed
}

posted @ 2018-04-02 10:48  Edge_of_Eternity  阅读(164)  评论(0编辑  收藏  举报