【发布时间】:2010-06-26 12:23:59
【问题描述】:
如果我是对的 display:inline 应该在同一行显示 div 而没有任何换行符。这是我的网页,其中 display:inline 只是让我的 div 不可见:
<html>
<head>
<style type="text/css">
.body{
max-width:3072px;
min-width:3072px;
margin:0px auto;
background:#293231;
}
.page1{
background:url('Main.jpg') no-repeat;
width:1024px;
height:211px;
}
.page2{
background:url('Page2.jpg') no-repeat;
width:1024px;
height:211px;
display:inline;
}
.page3{
background:url('Page3.jpg') no-repeat;
width:1024px;
height:211px;
display:inline;
}
.wrapper{
display:block;
width:100%;
height:auto;
}
</style>
</head>
<body class="body">
<div class="wrapper">
<div class="page1">
</div>
<div class="page2">
</div>
<div class="page3">
</div>
</div>
</body>
</html>
我可以看到 class= page1 的 div,但 page2 和 page3 是不可见的。
【问题讨论】:
-
也许您只是忘记在此处包含它,但请使用正确的Doctype 来触发标准模式。
标签: css