一、通过CSS设置
1、CSS设置背景图片途径及固定的位置
.bg { background-image: url(deangi.jpg); background-attachment: fixed; background-repeat: no-repeat; background-position: 50px 60px; }
2、把样式套用到<body>中
<body class="bg"> </body>
二、直接设置<body>
<body style=" background-image: url(../image/deangi.jpg);background-attachment: fixed;background-repeat: no-repeat;background-position: 50% 50%;"> </body>
上帝给我大脑于是我思考,上帝给我双腿于是我奔跑,上帝给我十指,于是我上网.经过思考后,我奔跑着来上网!
学习,然后实践下,呵呵。