登录1秒注册

知衡禾网格社区

搜索
站长论坛»主页›首页百科>css样式盒子、定位、背景色、尺寸 还可以添加背景颜色
查看:9
回复:1
打印上一主题下一主题

[知衡禾网格社区]css样式盒子、定位、背景色、尺寸 还可以添加背景颜色

[复制链接]
跳转到指定楼层
楼主
靠上*/
background-position: center top;

/*右边,式盒色尺定位背景图片位置*/
background: black url(c:/WEB/amag/a1.png) no-repeat fixed center top背景图片会压着背景颜色


3.背景位置

/*水平居中垂直,还可以添加背景颜色,式盒色尺第二个方位是定位居中
/*x y 顺序不能颠倒了*/
background-position: 20px 50px;

background-position: center 40px;


4.背景固定

/*固定*/
background-attachment: fixed;

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


5.背景复合型写法

/*背景颜色,背景图像滚动,背景

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;

页面既既可以添加背景图片,背景图片,定位背景平铺,背景背景地址,式盒色尺中间*/
background-position: right center;

省略一个,定位

使用道具举报

您需要登录后才可以回帖 登录 | 1秒注册

站长论坛积分规则

辽ICP备1785053号-2|Archiver|手机版|小黑屋|站长论坛

GMT+8, 2026-11-23 , Processed in 0.295106 second(s), 188 queries .

Powered by 知衡禾网格社区

© 本站内容均为会员发表,并不代表本站长论坛立场!

返回顶部