例子:

background:url(../images20130624/bg.png) no-repeat -1424px -5px;

官方API

Value: ['background-color'> ||<'background-image'> || <'background-repeat'>|| <'background-attachment'> ||<'background-position'>] | inherit
Initial: see individual properties
Applies to: all elements
Inherited: no
Percentages: allowed on 'background-position'
Media: visual
Computed value: see individual properties

 

background属性的值的书写顺序官方并没有强制标准的。
为了可读性,定一个CSS书写规范,规则2.1:background的值的顺序是background-color,background-image,background-repeat,background-attachment,background-position。

Css background缩写的更多相关文章

  1. CSS 背景-CSS background

    这里有个很好的样式学习网站:http://www.divcss5.com/rumen/r125.shtml 一.Css background背景语法   -   TOP CSS背景基础知识 CSS 背 ...

  2. CSS background 属性 总结

    CSS background 属性总结

  3. HTML CSS——background的认识(一)

    今天回归bug时无意间看到了样式表中background属性,如今总结一下: 1.background-color:设置元素的背景色.其值能够为:color-name.color-rgb.color- ...

  4. css background之设置图片为背景技巧

    css background之设置图片为背景技巧-css 背景 Background是什么意思,翻译过来有背景意思.同样在css里面作为css属性一成员同样是有背景意思,并且是设置背景图片.背景颜色. ...

  5. CSS background 之设置图片为背景技巧

    首先先来看看background有那些值: 可以按顺序设置如下属性(可点击进入相应的css手册查看使用):background-color 背景颜色background-image 背景图片backg ...

  6. CSS background 属性详解

    CSS background Property 语法: background: bg-color bg-image position/bg-size bg-repeat bg-origin bg-cl ...

  7. [CSS3] CSS Background Images

    Body with background image and gradient html { background: linear-gradient(#000, white) no-repeat; h ...

  8. css background之设置图片为背景技巧

    原文 Background是什么意思,翻译过来有背景意思.同样在css里面作为css属性一成员同样是有背景意思,并且是设置背景图片.背景颜色.背景图片截取等样式. 首先先来看看background有那 ...

  9. css background transparent All In One

    css background transparent All In One opacity ul { max-height: 100px; /* max-height: 187px; */ overf ...

随机推荐

  1. 深入解析 ext2 文件系统

     很久以来,就想写一篇关于ext 家族文件系统的文章,源于我刚工作的时候,曾经一不小心rm -rf,误删除了很多文件,当时真想有个数据恢复软件能帮我把数据回复了.当然学习数据恢复,首先要学习文件系统. ...

  2. because it is not a variable 编译错误解决方案

    1,将Stuct换为class 2,使用中间变量, 如Point p=new Point(x,y); this.Location=p; 而不能直接给struct赋值,因为值类型是不能改变的,必须生成新 ...

  3. C#中的预处理器指令详解

    这篇文章主要介绍了C#中的预处理器指令详解,本文讲解了#define 和 #undef.#if.#elif.#else和#endif.#warning和#error.#region和#endregio ...

  4. BootStrap2学习日记19---缩略图

    缩略图 代码: <ul class="thumbnails"> <li class="span3"><a href="# ...

  5. Django之牛逼的Models

    Django里的模型是对数据库对表的一次封装,是应用业务与数据之间的桥梁 要想使用Django的models 首先得配置settings Django默认使用的是sqlite,我使用的Mysql,配置 ...

  6. iOS 10 的一些资料整理

    文/判若两人丶(简书作者)原文链接:http://www.jianshu.com/p/0cc7aad638d9 1.iOS 10 隐私权限设置 iOS 10 开始对隐私权限更加严格,如果你不设置就会直 ...

  7. VS2010关于WindowsService 制作安装程序包,无法自动install的问题解决方法

    当添加了 安装项目后,需要做2个步骤的操作,第一是 右键点击 “视图”---“文件系统”,添加“项目输出“,好了后,再右键点击 “视图”---“自定义操作” 在安装中添加自定义操作,将刚才的”项目输出 ...

  8. xcode6 真机运行报错 Command /usr/bin/codesign failed with exit code 1

    解决方法: 百度下载‘iphone配置实用工具’, 打开此软件之后,选择预配置描述文件, 选中iphone过期和重复的描述文件,按delete键删除.然后重启xcode即可

  9. 多线程的练习----妖,等待唤醒,代码重构,lock到condition

    × 目录 [1]需求 [2]妖的出现和解决 [3]等待唤醒 [4]代码重构 [5]改成Lock Condition ------------------------------------- 1,需求 ...

  10. 每天一道LeetCode--58. Length of Last Word

    Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the l ...