右上固定:
------------------------
右下固定:
------------------------
左上
------------------------
左下
-------------------------
正中
-----------------------
右边
------------------
左边
--------------
上边
-----------------------
下边
1 | <style type= "text/css" > |
2 | <!-- |
3 | body{ |
4 | background-image : url ( "背景url" ); |
5 | background-position : 100% 0% ; |
6 | background-repeat : no-repeat ; |
7 | background-attachment : fixed ;} |
8 | --> |
9 | </style> |
右下固定:
01 | <!-- |
02 | body { |
03 |
04 | background-image:url( "5.jpg" ); |
05 | background-position:100% 100%; |
06 | background-repeat:repeat-y; |
07 | background-repeat:no-repeat; |
08 | background-attachment:right bottom; |
09 | } |
10 | --> |
左上
1 | <style type= "text/css" > |
2 | <!-- |
3 | body{ |
4 | background-image : url ( "背景url" ); |
5 | background-repeat : no-repeat ; |
6 | background-attachment : fixed ;} |
7 | --> |
8 | </style> |
左下
1 | <style type= "text/css" > |
2 | <!-- |
3 | body{ |
4 | background-image : url ( "背景url" ); |
5 | background-position : 0% 100% ; |
6 | background-repeat : no-repeat ; |
7 | background-attachment : fixed ;} |
8 | --> |
9 | </style> |
正中
1 | <style type= "text/css" > |
2 | <!-- |
3 | body{ |
4 | background-image : url ( "背景url" ); |
5 | background-repeat : no-repeat ; |
6 | background-attachment : fixed ; |
7 | background-position : center ;} |
8 | --> |
9 | </style> |
右边
1 | <style type= "text/css" > |
2 | <!-- |
3 | body{ |
4 | background-image : url ( "背景url" ); |
5 | background-position : 100% 0% ; |
6 | background-repeat : repeat-y ; |
7 | background-attachment : fixed ;} |
8 | --> |
9 | </style> |
左边
1 | <style type= "text/css" > |
2 | <!-- |
3 | body{ |
4 | background-image : url ( "背景url" ); |
5 | background-repeat : repeat-y ; |
6 | background-attachment : fixed ;} |
7 | --> |
8 | </style> |
上边
1 | <style type= "text/css" > |
2 | <!-- |
3 | body{ |
4 | background-image : url ( "背景url" ); |
5 | background-repeat : repeat-x ; |
6 | background-attachment : fixed ;} |
7 | --> |
8 | </style> |
下边
1 | <style type= "text/css" > |
2 | <!-- |
3 | body{ |
4 | background-image : url ( "背景url" ); |
5 | background-position : bottom ; |
6 | background-repeat : repeat-x ; |
7 | background-attachment : fixed ;} |
8 | --> |
9 | </style> |