CSS设置网页背景
- 全屏
- A
右上固定专用:
<style type="text/css">
body{
background-image:url("背景URL");
background-position:100% 0%;
background-repeat:no-repeat;
background-attachment:fixed;}
</style>
右下固定专用:
<style type="text/css">
body{
background-image: url("背景URL");
background-repeat: no-repeat;
background-attachment: right bottom;
}
</style>
左上固定专用:
<style type="text/css">
body{
background-image:url("背景URL");
background-repeat:no-repeat;
background-attachment:fixed;}
</style>
左下固定专用:
<style type="text/css">
body{
background-image:url("背景URL");
background-position:0% 100%;
background-repeat:no-repeat;
background-attachment:fixed;}
</style>
正中固定专用:
<style type="text/css">
body{
background-image:url("背景URL");
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center ;}
</style>
右边固定专用:
<style type="text/css">
body{
background-image:url("背景URL");
background-position:100% 0%;
background-repeat:repeat-y;
background-attachment:fixed;}
</style>
左边固定专用:
<style type="text/css">
body{
background-image:url("背景URL");
background-repeat:repeat-y;
background-attachment:fixed;}
</style>
上边固定专用:
<style type="text/css">
body{
background-image:url("背景URL");
background-repeat:repeat-x;
background-attachment:fixed;}
</style>
下边固定专用:
<style type="text/css">
body{
background-image:URL("背景URL");
background-position:bottom;
background-repeat:repeat-x;
background-attachment:fixed;}
</style>
版权声明:若无特殊注明,本文皆为( VISAce )收集整理,版权归原作者所有。—— 李佳培.中国
发表评论
既然没有评论,那就赶紧抢沙发吧!