背景经常用到以下属性:

background-color: aliceblue;
background-image: url('2017102601.png');
background-position: center bottom;
/*background-attachment: scroll;*/
background-attachment:fixed;
background-repeat: no-repeat;

特别注意:

1、background-position如果只写一个值,那么第二值默认是center

2、background-attachment的值是scroll的时,它是相对盒子进行定位的。如果是fixed的话,它是相对于浏览器进行定位。

属性的连写:

background: red url('2017102601.png') no-repeat bottom center scroll;

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 ...

  10. css & background & svg

    css & background & svg https://developer.mozilla.org/en-US/docs/Web/CSS/background backgroun ...

随机推荐

  1. 写给对<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">迷惑不解的小伙伴

    1.X-UA-Compatible X-UA-Compatible是自从IE8新加的一个设置,对于IE8以下的浏览器是不识别的. 通过在meta中设置X-UA-Compatible的值,可以指定网页的 ...

  2. Attempting to track I/O with systemtap

    https://glandium.org/blog/?p=1476 Attempting to track I/O with systemtap There are several ways a pr ...

  3. [Vue @Component] Dynamic Vue.js Components with the component element

    You can dynamically switch between components in a template by using the reserved <component>  ...

  4. 创建.m文件一片空白的错误解决方式

    今天写代码,想继承一个类,突然发现创建的类文件一片空白,如图 之后各种调试发现都解决不了问题,以为是装了xcode6 beta2 版本号的问题,结果发现事实上是我创建错了 我创建的是 watermar ...

  5. Xsolla带你走进印度移动游戏市场

    作为世界上人口第二大国的印度.随着移动时代的到来,越来越多的开发人员将目光瞄准了这个国家.今天Xsolla就带领大家一起来了解这样一个新兴的移动游戏市场. 印度移动市场潜力巨大 作为世界四大宗教和数字 ...

  6. LeetCode 三数之和 — 优化解法

    LeetCode 三数之和 - 改进解法 题目:给定一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?找出所有满足条件且不重复 ...

  7. 设置IIS 兼容32位DLL

    限Win7/Windows servser 2008  IIS的设置: 1.选择引用程序池 2.选择公布网站的.点击高级设置 3.启用32位应用程序属性改为True

  8. AngularJS入门学习

    初识: {{}}   这种双层花括号的语法称之为:插值语法:也可以说是 标识符:AngularJS 主要就是使用这种方法进行数据绑定 ng-module="name"   在ng的 ...

  9. Codeforces--622A--Infinite Sequence(数学)

     Infinite Sequence Crawling in process... Crawling failed Time Limit:1000MS     Memory Limit:26214 ...

  10. [Codeplus 2017] 晨跑

    [题目链接] https://www.lydsy.com/JudgeOnline/problem.php?id=5105 [算法] 答案为三个数的最小公倍数 [代码] #include<bits ...