我正在尝试制作一个与 facebook 完全一样的标题,但是当我修复它时,它的内容开始在窗口调整大小时改变位置。 喜欢这里 http://www.housetostay.co.za/ 我怎样才能解决这个问题 下面是我的代码
<html>
<head>
<style>
.heading {
display:block;
top:0px;
left:0px;
right:0px;
height:20px;
position:fixed;
border:1px solid #888;
padding:0px;
text-align:center;
font-weight:bold;
color:#000;
background: #ccc;
width: 100%;
height: 100px;
z-index:3;
}
</style>
</head>
<body>
<div class = "heading">
<table id ="headertable" align="left">
<tr>
<td>
<a href="http://www.housetostay.co.za">
<h2 class= "logo">HouseToStay</h2>
<td> </td>
</a>
</td>
<td><a href="http://www.housetostay.co.za" class="button middle">How it works</a></td>
<td><a href="http://www.housetostay.co.za" class="button middle">Contact us</a></td>
<td><a href="register.php" class="button middle">PostAd</a></td>
<td><a href="jobs.php" class="button middle">Jobs</a></td>
<td><a href="http://www.housetostay.co.za" class="button middle">Buy it</a></td>
<td>
</td>
</table>
<table class ="profile">
<tr>
<td>
<h2>user</h2>
</td>
<td>
<img src="bhubezi/images/logos/nopic.png" width="50" height="40">
</td>
</tr>
</table>
</div>
最佳答案
关于html - 我怎样才能像 facebook 一样制作标题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15051480/