我正在显示来自数据库的电影列表——它们应该是内联显示的,但它们是垂直显示的。我曾尝试对 li 和 inline 使用 inline-block,但没有任何效果。任何帮助表示赞赏。谢谢!
.movienav {
height: 500px;
width:75%;
float:left;
margin-top:25px;
clear:left;
padding-bottom: 45px;
}
.movienav li {
width: 340px;
height: 450px;
float: left;
margin-right: 10px;
position: relative;
display:inline;
list-style:none;
}
.movienav li div {
backface-visibility:hidden;
width: 340px;
height: 450px;
overflow: hidden;
background: #161616;
position: absolute;
top: 0;
left: 0;
display:inline;
}
.movienav li div.back {
backface-visibility:hidden;
left: -999em;
padding-bottom: 15px;
background-color:#161616; /*max-height:450px; overflow:auto;*/
margin-top: 0;
display:inline;
}
<div class="movienav">
<ul>
<li><div class="front"><img src="<?php echo $imglink; ?>" width="340" height="450" class="dvdcover" /></div>
<div class="back">
<p><?php echo $description; ?></p>
</div>
</li>
</ul>
</div>