样机网页布局字体比 illustrator 小
这听起来可能很明显:
我习惯用 illustrator 设计网页的模型。当我将所有内容转换为 css 并在浏览器中测试页面时,我可以看到 illustrator 模型中的字体更大,即使我使用相同的字体设置在CSS方面。
//in css i have
body{font:Georgia,"Times New Roman",Times,serif;font-size:16px;
font-weight:normal;}
//I wrapped the example text inside "h1" tags
h1{font-size:24px;font-weight:normal;}
//in illustrator I have font georgia,24px,font-style "regular" selected
我该如何解决这个问题?
谢谢
Luca
It may sound obvious:
I'm used to design mockups of my webpages with illustrator.When I translate everything to css and test the page into my browser I can see that fonts are bigger in the illustrator mockup even if I used the same font setting on the css side.
//in css i have
body{font:Georgia,"Times New Roman",Times,serif;font-size:16px;
font-weight:normal;}
//I wrapped the example text inside "h1" tags
h1{font-size:24px;font-weight:normal;}
//in illustrator I have font georgia,24px,font-style "regular" selected
How could I fix that?
thanks
Luca
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它们似乎是完全不同的字体 - 看看小写的 e 和 g。使用检查器检查 IE 正在使用哪种字体。您可以按 F12 激活检查器。
编辑: IE8 使用的字体看起来像 IE 的默认字体 Times New Roman。尝试将
font:Georgia
部分替换为font-family:Georgia
。 font 属性旨在用作一次设置所有字体属性的简写,并且当仅用于设置字体时可能不起作用。They seem to be different fonts altogether - look at the lowercase e and g. Check which font IE is using with the inspector. You can activate the inspector by pressing F12.
EDIT: The font IE8 is using looks like Times New Roman, IE's default font. Try replacing the
font:Georgia
part withfont-family:Georgia
. The font property is meant to be used as a shorthand to set all font properties at once and will probably not work when used to set only the typeface.我想这是因为不同的浏览器处理字体的方式与 Illustrator 不同。正如您所注意到的,您可以使用 CSS 控制字体大小/间距等类似的东西 - 您是否在 Illustrator 中使用了任何其他字体设置,例如字距调整或类似的东西?这可能会影响它。
I would imagine that this is because different browsers handle fonts differently to Illustrator. You can control the font size / spacing and that kind of thing using CSS, as you've noticed - have you got any other font settings you're using in Illustrator like kerning or that sort of thing? That could be affecting it.