SIFR 新手:非 Flash 浏览器中的字体显示问题
我想知道是否有人可以帮助我解决这个问题,因为我对 siFR 相当陌生,并且认为文档中有一些我不理解的重要内容。
我成功使用 siFR 3 (r436) 渲染字体,它的工作方式正是我想要的。但是,如果我在任何浏览器中关闭闪光灯,原始(不再渲染)的 html 文本显示确实非常糟糕。 我认为在任何非 Flash 浏览器中,我的 inital 样式表都会被引用,而不是 siFR.css,并且我将能够将 html 文本作为单独的实体进行调整。 我想我可能开发了这个坏主意,因为我记得在早期的 siFR 版本中,你必须在原始样式表 + sifr-config 上搞乱很多样式,这样你才能在 html 和渲染字体之间获得相应的行高/宽度等。 (我意识到 siFR 3 以不同的方式渲染 Flash)
所以看来 siFR.css 控制非 Flash 文本和渲染字体。
无论如何,我的基本菜鸟问题是:如何使原始 html 文本与渲染字体具有相同的尺寸?
谢谢你的帮助
I'm wondering if someone can help me with this as I'm fairly new to siFR and think there is something essential i'm not comprehending in the documentation.
I'm having success using siFR 3 (r436) to render fonts and it's working just how I want. However if I turn flash off in any browser the original (no longer rendered) html text displays very badly indeed.
I thought that in any non-flash browser my inital stylesheet would be referred to and not siFR.css and I would be able to adjust the html text as a seperate entity.
I think i probably developed this bad idea because I remember in earlier siFR versions you had to mess around alot with stylings on the original stylesheet + the sifr-config so you would get corresponding line heights/widths etc between the html and rendered font. (i realise that siFR 3 renders the flash in a different way)
So it seems that siFR.css controls both the non-flash text and the rendered font.
Anyway my essential noob questions is: how do i get the the original html text to have the same dimensions as the rendered font?
thanks for you help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
sIFR 放大 Flash 对象以匹配原始字体大小。限制是您的 Flash 文本大小必须大于原始文本。使用与浏览器字体规格尽可能匹配的 Flash 字体。
在CSS中,您需要了解
.sIFR-active
。使用时:所有
元素将替换为 Flash 文本,并添加
.sIFR-active
类。目的是控制 sIFR 处于活动状态时元素的样式方式。特别是,当 sIFR 处于活动状态时,visibility
设置为hidden
。当闪光灯关闭时,sIFR 未启用,但根据您的描述,您似乎编写了仅与
sIFR-active
类的元素匹配的 CSS 规则。请参阅sIFR wiki、如何使用和样式 零件。
sIFR scales up the flash object to match the original font size. The limitation is that your flash text size has to be bigger than the original text. Use a flash font that matches the metrics of your browser font as closely as possible.
In the CSS, you need to know about the
.sIFR-active
. When you use:All the
<h1>
elements will be replaced with flash text and the.sIFR-active
class is added. The purpose is to control how elements are styled when sIFR is active. Particularly, when sIFR is activevisibility
is set tohidden
.When flash is off, sIFR is not enabled but according to what you described, you seemed to have written css rules that only match elements with the
sIFR-active
class.See sIFR wiki, How to Use and Styling parts.