Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css px中的字体大小因平台而异_Css_Font Size - Fatal编程技术网

Css px中的字体大小因平台而异

Css px中的字体大小因平台而异,css,font-size,Css,Font Size,我是css的初学者,从FileMaker(数据库)发送html/css邮件。我读过关于字体大小的文章。我希望能够为邮件设置一个标准字体大小,并使用px,因为它应该是一个绝对大小。如果我从Windows发送邮件到Windows,或从Mac发送邮件到Mac,邮件大小保持不变,但在Mac 1 px上似乎是1磅(1/72英寸),而在Windows上则是1/96英寸。 html看起来像: <html> <head> <style type='text/css'> bod

我是css的初学者,从FileMaker(数据库)发送html/css邮件。我读过关于字体大小的文章。我希望能够为邮件设置一个标准字体大小,并使用px,因为它应该是一个绝对大小。如果我从Windows发送邮件到Windows,或从Mac发送邮件到Mac,邮件大小保持不变,但在Mac 1 px上似乎是1磅(1/72英寸),而在Windows上则是1/96英寸。 html看起来像:

<html>
<head>
<style type='text/css'>
body
{
font-family: 'Arial';
font-size: 14px;
font-style: normal;
}
</style>
</head>
<body>
<SPAN STYLE= "" ><BR><BR>text</SPAN>
</body>
</html>

身体
{
字体系列:“Arial”;
字体大小:14px;
字体风格:普通;
}

文本

从Mac向Windows发送邮件会产生较小的字体,从Windows向Mac发送邮件会产生较大的字体。我做错了什么?

如果您想要稍微一致的大小,我会使用em而不是px

如果你想变得花哨,你可以使用新型的rem装置。它并不适用于所有浏览器,但它是一种响应性的变体,根据用户特定的分辨率和ppi设置调整depnding的大小