Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,当前代码在 Firefox 中不起作用:
<button style="border:solid 1px gray; width:50px; height:22px;line-height:22px; vertical-align:top;">Button too long</button>
jsfiddle 示例
正如您在 chrome 中看到的那样,文本被裁剪为按钮的宽度,而在 Firefox 中它仍然显示文本......
知道如何解决这个问题吗?谢谢。
http://jsfiddle.net/djsbellini/sYJXn/
在 CSS 中只需要这个:
overflow: hidden;