我正在一个 1280 像素宽的屏幕上开发,虽然我显示的图片加起来只有 1264 像素,但最后一张没有显示内联,而是放在新行中。
<!DOCTYPE html>
<html>
<head>
<title>My Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="CSS/indexCSS.css">
</head>
<body>
<div class="topPics">
<ul>
<li>
<a href="">
<img src="images/santa.jpg"/>
</a>
</li>
<li>
<a href="">
<img src="images/eyes.jpg"/>
</a>
</li>
<li>
<a href="">
<img src="images/ladyBlue.jpg"/>
</a>
</li>
<li>
<a href="">
<img src="images/andy.jpg"/>
</a>
</li>
</ul>
</div>
<div class="logo">
<span style="font-size: 30px; color: #fff; font-family: cursive;"> TEXT</span>
<span style="color: #999"> | TEXT</span>
</div>
</body>
</html>
CSS
root {
display: block;
}
body{
background: #0f0f0f;
width: 100%;
height: 100%;
}
ul{
overflow: hidden;
}
li{
margin: 0px;
float: left;
height: 100%;
}
.topPics{
overflow: hidden;
height: 100%;
width: 100%;
}
.logo{
margin-top: 10px;
margin-bottom: 10px;
margin-left: 40px;
width: 100%
}
谁能看出这有什么问题?