当前位置:首页 >> 探索

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

  • 探索
  • 2026-07-21 12:23:20
  • 1754

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

  • 关注微信

猜你喜欢

热门阅读

  • 京东若何切换账号登录
  • 收入宝被冻结了若何冻结
?收入宝冻结此后资金安然吗?
  • 迅捷CAD编辑器若何筹算图纸建筑面积	?CAD图纸面积测量编制
  • 原神卡利贝尔义务具体攻略
  • 京东618甚么时辰最早
  • 原神嘲弄命运的资格义务具体攻略

关注我们

微信公众号