在哪里指定 sIFR 的行高
我没有运气改变 sIFR 的行高。我尝试更改 sIFR css 和配置文件以及我的通用样式表。有什么特别的技巧吗?
通用 CSS
h1 {
font-family: Georgia, Times, serif;
font-size: 24px;
font-style: normal;
line-height: 16px; (has had zero impact, even when I go negative)
color: #000000;
text-transform: uppercase;
margin: 0;
padding: 0;
outline: none;
}
配置文件
sIFR.replace(minionpro, {
selector: 'h1', wmode: 'transparent',
css: '.sIFR-root { color:#000000; text-transform: uppercase; }'
});
I have not had any luck changing the line height for sIFR. I have tried changing the sIFR css and config file as well as my general style sheet. Is there a special trick?
GENERAL CSS
h1 {
font-family: Georgia, Times, serif;
font-size: 24px;
font-style: normal;
line-height: 16px; (has had zero impact, even when I go negative)
color: #000000;
text-transform: uppercase;
margin: 0;
padding: 0;
outline: none;
}
CONFIG FILE
sIFR.replace(minionpro, {
selector: 'h1', wmode: 'transparent',
css: '.sIFR-root { color:#000000; text-transform: uppercase; }'
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Flash 使用
leading
而不是line-height
,因此只需使用:leading
值必须是一个单独的数字,没有测量值如 px、em、% 等。Flash uses
leading
instead ofline-height
, so simply just use:The
leading
value must just be a number on its own with no measurement value such as px, em, %, etc.起初我以为这不起作用,但我意识到领导的单位与他们完全不同。我尝试了更大的值“leading: -10;”效果很好。我正在使用 sIFR 3 r436。
At first I thought it wasn't working, but I realized that the units for leading are totally different from em. I tried a larger value "leading: -10;" and it worked fine. I'm using sIFR 3 r436.
我会大胆猜测并这么说,因为你的字体大小> line-height (24px > 16px) sIFR 将忽略 line-height 属性并使用 font-size 来创建 Flash。
如果您尝试获取两行重叠文本(16 像素行上的 24 像素文本将导致 8 像素重叠),则您可能正在扩展 sIFR 的功能。
编辑
看起来sIFR有一些奇怪的方法来根据不同因素计算字体大小...查看链接以获取详细信息(不知道您的sIFR版本,我无法评论您的情况)。
Novemberborn:使用 sIFR 调整字体大小
I'm going to take a wild guess and say that because your font-size > line-height (24px > 16px) sIFR is going to ignore the line-height property and use the font-size to create your flash.
If you're trying to get two lines of overlapping text (24px text on a 16px line will result in 8px of overlap), you're probably stretching the capabilities of sIFR.
EDIT
It looks like sIFR has some strange methods for calculating font size based on different factors...check out the link for the details (without knowing your version of sIFR, I can't comment on your situation).
Novemberborn: Font Sizing with sIFR
Flash 影片内的行高是使用
.sIFR-root
类的(自定义)leading
CSS 属性来控制的。 Flash 没有您可能在 CSS 中熟悉的line-height
概念。Line height inside the Flash movie is controlled using the (custom)
leading
CSS property for the.sIFR-root
class. Flash doesn't have the concept ofline-height
as you might be familiar with from CSS.