【发布时间】:2013-06-09 05:32:05
【问题描述】:
<html>
<head>
<link href="styles/main.css" type="text/css"
rel="stylesheet" media="screen"/>
</head>
<body>
<div id="wrapper">
<?php include_once("forall.php");?>
<?php include_once("template_nav.php"); ?>
<div id="content"></div>
<div id="footer">abcd</div>
</div>
</body>
</html>
我的css代码:
*
{
margin:0px;
padding:0px;
}
body
{
font-family: verdana;
background-image: url(http://local host/Website/imagess/sp.jpg);
}
#wrapper
{
width: 1024px;
margin-left: 120px;
background-color: #ebebeb;
}
#header
{
height:200px;
}
.logo
{
margin-top: 50px;
float: left;
height::200px;
background-image: url(http://local host/Website/imagess/sur99.jpg);
}
#searchbox
{
float:right;
margin-top:100px;
}
#nav{
clear: both;
height:50px;
margin-left: 30px;
background-image: url(http://local host/Website/imagess/s4.jpg);
}
ul#navmenu,ul.submenu1
{
list-style-type:none;
}
ul#navmenu li
{
width:123px;
text-align:center;
position:relative;
float:left;
margin-right:4px;
padding:5px;
}
ul#navmenu a{
text-decoration:none;
display:block;
width:123px;
height:30px;
line-height:30px;
border-radius:5px;
color:white;
font-weight:bold;
margin-top:10px;
}
ul#navmenu .submenu1 a
{
margin-top:3px;
}
ul#navmenu li a:hover
{
background-color:black;
}
ul#navmenu ul.submenu1
{
display:none;
position:absolute;
}
ul#navmenu li:hover .submenu1
{
display:block;
}
.darrow
{
font-size:11pt;
position:absolute;
top:21px;
right:16px;
color:white;
}
#footer
{
width:1024;
background-color:#696969;
}
包含文件“forall.php:
<div id="header">
<div class="logo">
</div>
<div id="searchbox">
<form id="searching">
<input type="text" name="forsearch">
<input type="button" name="search"
value="search">
</form>
</div>
</div>
我已将根目录从 localhost/ 更改为“localhost/Website”,因为我的索引文件和图像(在 imagess 文件夹中)位于 wamp/www/Website 的网站文件夹中 当我在 WAMP 中运行我的页面时,不显示图像。 替代文字可见,但图像不可见。 请帮忙
【问题讨论】:
-
这个 =>
http://local host错误,另外你确定你的图片确实在imagess而不是images?键盘有时很拧。最好确保你的 Kool-Aid 没有溅到那里;-) -
我的猜测是基于他在代码下方的评论,即带有两个“s”的“imagess”是正确的。或者,他洒了几罐 Kool-Aid。 :)
-
@Ryaminal 曾经对我来说是咖啡,但我很快就解决了这个问题。我喝了我的键盘!现在我可以用任何语言说话和拼写,同时保持清醒。 ;-)
-
就像 :::ELVIS::: - OP 已经离开了大楼。