且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

firefox/Mac & css 的区别火狐/视窗

更新时间:2022-05-26 23:05:15

如果字段大小在 em 中给出,则将它们更改为 px.

If field sizes are given in ems, then change them to px.

em 依赖于字体大小,并且字体大小不是像素完美的(不同的浏览器对其进行不同的舍入,确切的宽度可能取决于字体,特别是如果字段之间的间隙是一个空格).

em is dependent on font-size, and font sizes aren't pixel-perfect (different browsers round it differently, exact width may depend on font, especially if that gap between fields is a space).

在容器中留出一些空间(只是让包含元素比它必须宽几个像素).

Leave some room in the container (just make containing element few pixels wider than it has to be).

你也可以试试:

input {
 box-sizing: border-box; 
 -moz-box-sizing: border-box; -webkit-box-sizing: border-box;
}   

这使得表单元素的大小更加一致.

Which makes sizes of form elements a little bit more consistent.