当前位置:首页 >> 娱乐

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

  • 娱乐
  • 2026-09-04 22:59:21
  • 3724

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

  • 关注微信

猜你喜欢

热门阅读

  • 谢贤7月16日因肺炎弃世 家人遵绝笔低调离往
  • 贝尔法斯特女王除夜学研究生落第前说起专业引见
  • 安特卫普除夜学研究生进学前提纲求有哪些
  • 俄勒冈除夜学研究生留学央求前提是甚么
  • 刘诗诗身穿阿玛尼***高定现身百花奖	,繁华坦荡尽显格式
  • 杜克除夜学研究生留学前提是甚么

关注我们

微信公众号