如何在DW中设置固定背景图?
发布网友
发布时间:2022-04-23 14:10
我来回答
共1个回答
热心网友
时间:2023-10-05 22:48
背景固定代码整合
右上固定専用。
<STYLE TYPE="text/css">
<!--
BODY{
background-image:url("背景のURL");
background-position:100% 0%;
background-repeat:no-repeat;
background-attachment:fixed;}
-->
</STYLE>
右下固定専用。
×××
<!--
body {
background-image:url("5.jpg");
background-position:100% 100%;
background-repeat:repeat-y;
background-repeat:no-repeat;
background-attachment:right bottom;
}
-->
左上
<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>