首页 > 代码库 > background 背景
background 背景
1、背景颜色
background-color: red;
2、背景图片
background-image: url(img/1.jpg);
3、背景重复
background-repeat: no-repeat;/*不重复*/
background-repeat: repeat;/*重复*/
background-repeat: repeat-x;/*X轴重复*/
background-repeat: repeat-y;/*Y轴重复*/
4、背景定位:可以用像素和英文
background-position: 10px 10px;
background-position: center top;
5、背景是否滚动
background-attachment: fixed; /*相对可视区固定位置*/
background-attachment: scroll; /*随滚轮滚动*/
6、复合样式:没有顺序之分,编写习惯如下
background: red url(img/1.jpg) no-repeat center top fixed;
background 背景
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。