[英]When i use transform translate than my border height increase more 1px how to solve it?
[英]HTML and CSS. Bug: Appending 1px border when i make my scale more
這是模板:
http://jsfiddle.net/4gvy5/embedded/result/
代碼:HTML
<div class="wrapper">
<ul class="block-list">
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</div>
CSS
*{
margin: 0;
padding: 0;
border: none;
}
.wrapper{
width: 100%;
padding: 40px 0;
background: #e6e6e6;
}
.block-list{
list-style: none;
width: 940px;
margin: auto;
overflow: hidden;
}
.block-list li{
display: block;
float: left;
width: 298px;
margin-right: 20px;
background: #fff;
border: 1px solid #d9d9d9;
padding: 20px 0;
text-align: center;
}
.block-list li:last-child{
margin-right: 0;
}
當我調整窗口大小時,使其縮放更大-最后一個孩子掉下來。 我查看了元素面板,了解了為什么會發生。 li塊的所有邊框(右或左)都增加到1px。 這就是塊的寬度變為301px的原因。但是在正常比例下,塊的寬度為300px。 我該如何解決這個問題? 請幫助。 我會感謝大家。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.