我有一個按鈕,裏面有圖像和分隔符。 的HTML代碼如下:只有使用Internet Explorer時,圖像內部的按鈕纔會被切斷。
<button class="uiImageButton" id="btFactors" style="flex:1 1 0px;" type="button">
<img id="btFactorsImgID" style="vertical-align: bottom;" src="">
<div class="uiImageButtonSeperator">Factors/Formulas</div>
</button>
而CSS:
.uiImageButton {
border: 1px solid;
padding: 0px;
border-color: #007AC3;
background-color: white;
color: #007ac3;
text-align: left;
height: 23px;
width: 100%;
font-size: 14px;
font-family: Muli-Light;
}
.uiImageButtonSeperator {
border-left: 1px solid lightgrey;
padding-left: 4px;
vertical-align: bottom;
display: inline;
margin-left: 1px;
margin-right: 2px;
}
我面臨的問題是,在Internet Explorer中查看網頁時,該按鈕內的圖像被切斷(圖像被放置在按鈕的底部,其中一些被切斷)。 當使用Chrome看起來鰭...... 我還發現,加入這行代碼的類uiImageButton
display: flex;
時,它提供的結果是緊挨什麼我真的試圖讓但不密切足夠。
如果有人能解釋爲什麼我只有在IE中遇到這個問題,以及如何正確解決這個問題,那將會很棒。
ü可以創建一個演示?我不能重現一個錯誤https://jsfiddle.net/6y26r9jv/ – 3rdthemagical
好吧我重新創建它:https://jsfiddle.net/w4hjpz7o/請用IE打開這個 – itay312
我不明白你在努力實現什麼。圖像被切斷的方式是什麼?它在示例中沒有src,因此不可見。當我放入src時,它顯示得非常好,至少如果它小於按鈕的高度。因此,重複一遍,你試圖達到什麼目的(這不能通過簡單地去除按鈕的高度限制來完成)? –