1
如何删除右边的剩余空间: HTML代码:的CSS定心箱百分比运作
<div class="wrapper">
<a href="#"><h1>Title 1</h1></a>
<a href="#"><h1>Title 1</h1></a>
<a href="#"><h1>Title 1</h1></a>
</div>
CSS代码:
.wrapper {
height: 450px;
margin: 50px;
border-radius: 30px;
overflow: hidden;
background-color: #F00;
border: 1px solid #000;
display:block;
}
.wrapper a {
width: 33.3%;
height: 100%;
background-color: #444;
margin:0 auto;
float: left;
color: #fff;
text-decoration: none;
display:inline-block;
}
.wrapper a:nth-child(2) {
background-color: #333;
}
.wrapper a h1 {
width: 100%;
height: 70px;
text-align: center;
position: relative;
bottom: 0;
text-shadow: 1px 1px #000;
}
的3块必须是33.3%但其余(0,1%)不会被填充,并且我使用33.4%,当页面较小时将会丢失1个区块
我应该使用什么?谢谢!对不起我的英文不好
'33.3333%'对我来说诡计多端。 – 2013-04-09 16:15:04
33.333333333333333333333333333333% – 2013-04-09 16:15:29