[英]different represent of HTML in firefox and chrome
我感到困惑:此代碼守護程序在Firefox和Chrome中顯示不同:
<div style="border:1px solid black;">
<a href="baidu.com" >AA<span style="float:right">BB</span></a>
</div>
a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 1.42857;
color: rgb(51, 51, 51);
white-space: nowrap;
border:1px solid red;
}
CodePen: http ://codepen.io/ChinaXing/pen/jwFon
在Chrome中:
在Firefox中:
刪除樣式“空白:nowrap”
AABB
a {
padding: 3px 20px;
font-weight: normal;
clear: both;
line-height: 1.42857;
color: rgb(51, 51, 51);
border:1px solid red;
}
span {
float:right;
}
添加text-align:left; overflow:hidden;
text-align:left; overflow:hidden;
到錨標簽
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.