码迷,mamicode.com
首页 > Web开发 > 详细

html and css(1)

时间:2015-01-07 20:35:21      阅读:194      评论:0      收藏:0      [点我收藏+]

标签:

 1 body{
 2     background-image:url(‘11.jpg‘);
 3     background-color:yellow;        
 4     background-repeat:no-repeat;     
 5     background-attachment:fixed;    
 6     background-position:center;
 7     background-origin:content-box;
 8 }
 9 
10 
11 /*    
12 body{
13     background-image:url(‘11.jpg‘);  //背景图片
14     background-color:yellow;           //背景颜色
15     background-repeat:no-repeat;     //规定如何重复背景图片
16     background-attachment:fixed;     //规定背景图片是否固定或者随着页面的其余部分滚到
17     background-position:center;      //规定背景图片的位置
18     background-size:cover;           //大小
19     background-origin:content-box;         //相对于内容框来定位背景图像
20     background-clip:content-box;        //规定背景的绘制区域
21 }
22 
23 
24 position:
25 top left
26 top center
27 top right
28 center left
29 center center
30 center right
31 bottom left
32 bottom center
33 bottom right
34 
35 repeat:
36 repeat    默认。背景图像将在垂直方向和水平方向重复。
37 repeat-x    背景图像将在水平方向重复。
38 repeat-y    背景图像将在垂直方向重复。
39 no-repeat    背景图像将仅显示一次。
40 
41 origin:
42 padding-box    背景图像相对于内边距框来定位。
43 border-box    背景图像相对于边框盒来定位。
44 content-box    背景图像相对于内容框来定位。    
45 
46 clip:
47 border-box    背景被裁剪到边框盒。
48 padding-box    背景被裁剪到内边距框。
49 content-box    背景被裁剪到内容框。
50 
51 attachment:
52 scroll    默认值。背景图像会随着页面其余部分的滚动而移动。
53 fixed    当页面的其余部分滚动时,背景图像不会移动。
54 inherit    规定应该从父元素继承 background-attachment 属性的设置。
55 */

 

html and css(1)

标签:

原文地址:http://www.cnblogs.com/yzdqxing/p/4209175.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!