Html 中的背景(background)
来源:互联网 发布:python入门视频 编辑:程序博客网 时间:2024/06/08 05:42
Html 中的背景(background)
background-color : transparent | color
注:
transparent默认值。背景色透明。
Color : 指定颜色。
background-image:none | url(1.jpg)
注:(图片与html文件同目录)
background-repeat:repeat|no-repeat|repeat-x|repeat-y
注: (图像小的时候比较明显)
repeat 背景图片在纵向和横向上平铺(默认值)
no-repeat背景图片不平铺
repeat-x 横向平铺
repeat-y 纵向平铺
background-attachment:scroll | fixed
scroll 背景图片随对象内容滚动
fixed 背景图像固定
background-postion: left|center|right|top|center|bottom
background-postion: 30px 40px; (x ,y) 水平,竖直
注意:
在做项目时,许多小DIV 公用同一张背景图片,这时就是用到了
Background-position ,即每个DIV 调用不同的position
div元素不动。直接移动背景图片实现公用同一张背景图片的目的。
把背景图片往下拉,属性值向y 轴正方向变化
背景图片往上拉。 属性值向y 轴负方向变化
把背景图片往左拉,属性值向x轴负方向变化
把背景图片往右拉,属性值向x 轴正方向变化
Background 集中设置:
background: gray url() no-repeat 500px 400px
body 也有背景的各种属性。
- Html 中的背景(background)
- OpenCV 中的背景提取(Background Subtraction)模型
- HTML学习14-background背景
- Eclipse Background (背景)设置
- 渐变背景(background)效果
- CSS(3) Background(背景)
- background 背景(集合样式)
- 背景background
- background背景
- background背景
- HTML float浮动标签和background 背景标签
- HTML基础学习-15-background 背景相关属性设置
- css手册(一)Background 背景
- android ui 修改应用背景(background)
- 12.(初级)CSS背景background
- 背景渐变:html5+css3中的background: -moz-linear-gradient
- css背景属性 Background
- div css background背景
- iOS项目开发实战——实现苹果本地消息通知推送服务
- SQL SERVER 存储大全以及常见实例
- 控制台出现abd端口被占用,导致android项目不能正常运行
- Linux中fork的使用(03)---使用if...else...区分父子进程特有的内容
- IOS - NSURLConnection大文件下载
- Html 中的背景(background)
- 协同过滤入门介绍(转)
- linux常用命令(38):iostat 命令
- objective-c @protocol
- VS2003添加.BMP资源
- VS2010优化 http://blog.csdn.net/friendan/article/details/12390101
- MFC使用TransparentBlt透明贴图
- 【Linux】常用基本指令(较全)
- 在CentOS 6.4中编译安装gcc 4.8.1