css格式盒子 、定位 、布景物 、尺寸

boxhk93272026-07-21 19:17:14

1.布景物华

/*通明色*/
background-color: transparent;

/*半通明*/
background: rgba(0, 0, 0, 0.5)

/*换色彩*/
background-color: #;

2.布景图片

/*钞缮实例 默许平坦的*/
background-image: url(c:/WEB/amag/a1.png);

/*不服展*/
background-repeat: no-repeat;

/*平坦*/
background-repeat: repeat;

/*x 平坦*/
background-repeat: repeat-x;

/*y 平坦*/
background-repeat: repeat-y;

页面既既可以添加布景图片,还可以添加布景物华,定位布景图片会压着布景物华


3.布景职位

/*程度居中垂直,靠上*/
background-position: center top;

/*右边,物尺中心*/
background-position: right center;

省略一个,式盒第二个方位是定位居中
/*x y 按序不克不及倒置了*/
background-position: 20px 50px;

background-position: center 40px;


4.布景结实

/*结实*/
background-attachment: fixed;

/*随对象内容动弹*/
background-attachment: scroll;


5.布景复合型写法

/*布景物华,布景图片,布景布景地址,物尺布景平坦	,式盒布景图象动弹,定位布景布景图片职位*/
background: black url(c:/WEB/amag/a1.png) no-repeat fixed center top
上一篇:上海这里“下雪”啦!黄浦江边“赏雪”滑冰攻略请收下→
下一篇:《庆余年2》收官!张若昀发长文,剧组官宣第三季
相关文章