我已经找到了一个类似的问题,但没有点击。
这是我的代码,我想要两个背景。我知道如何添加两个背景,但一个背景图像需要在一个特定的位置,通过使用 div 来完成。我的代码可能有最简单的缺陷。请注意,我是一个新手,并试图从我已经知道的少量知识再次进入 Web 开发。
<head>
<style type="text/css">
body {
<div id="currentpage">
background-image: url(bgsource/contactpage.png);
background-repeat: no-repeat;
</div>
}
#currentpage{
position: absolute;
width:auto;
height:auto;
left:424px;
top:134px;
margin-left:0px;
margin-top:0px;
}
</style>
<?php include_once("general.php"); ?>
</head>
我可能想包括我有一个加载到每个页面的 general.php 模板,这是否也会影响背景工作?