CSS 背景background,精灵spirit(移动背景图位置来实现)
来源:互联网 发布:网络文学作品排行榜 编辑:程序博客网 时间:2024/06/05 22:32
CSS背景background
background-color: 背景色,英文单词或十六进制颜色都可以。
background-image:url(图片路径)背景图
background-repeat:(no-repeat不重复,repeat-x,repeat-y)重复
如: .box{background:#ccc url(图片的路径) no-repeat 定位坐标 fixed }
background-color: 背景色,英文单词或十六进制颜色都可以。
background-image:url(图片路径)背景图
background-repeat:(no-repeat不重复,repeat-x,repeat-y)重复
background-position:(left,center top bottom right) 背景图定位。(left top 表示左上角。right bottom 表示右下角。center 中间。left 20px 表示左边,向下移动20像素。 -30px -20px 表示向左移动30px,向上移动20px (spirit精灵就是通过移动背景图(大的背景图中有很多小的图)的位置来实现的,通常都是负数))
如:a{ width:110px;height: 40px;background:url(bg1.png) no-repeat -20px -50px; display:block;} /* <a>标签是行内元素,width和height属性不起作用。加上display:block; 指定为块元素,width和height属性才会生效 */
background-attachment: (依附方式)是否固定,fixed如: .box{background:#ccc url(图片的路径) no-repeat 定位坐标 fixed }
阅读全文
0 0
- CSS 背景background,精灵spirit(移动背景图位置来实现)
- CSS spirit /css精灵
- css background控制背景图像的位置
- CSS入门之背景样式实例,背景图滚动:background-attachment,background复合样式
- css实现背景图拉伸(css背景拉伸,有图例)
- CSS背景图像位置属性background-position百分比详解
- CSS背景图像位置属性background-position百分比详解
- CSS背景图像位置属性background-position百分比详解
- CSS精灵 background-position用法
- css背景属性 Background
- div css background背景
- CSS背景:background-attachment
- CSS中背景background
- CSS背景设置background
- CSS背景:background-repeat
- Css background背景语法
- 10008---CSS Background背景
- css用一张背景图background-position定位
- 双目立体视觉(一):SAD算法
- 人脸关键点
- C#控件介绍
- SAMBA多用户共享
- python基础知识四——局部作用域和//运算符
- CSS 背景background,精灵spirit(移动背景图位置来实现)
- 也不深入浅出,就慢慢走近Docker吧
- Effective Java——创建和销毁对象
- 58到家MQ如何快速实现流量削峰填谷
- Android FrameWork之旅 --- setContentView
- python函数的参数
- 用c语言简单实现三子棋游戏
- 从零学习Belief Propagation算法(二)
- 旅行系列-美国大提顿黄石公园杰克逊盐湖城七日【遇见无与伦比的美丽~】