【问题标题】:SIFR: How much is too much?SIFR:多少算太多?
【发布时间】:2009-03-04 21:25:41
【问题描述】:

第一次在这里发布海报,使用“sifr3-r436”构建。

我正在我公司的网站上工作,并决定是时候开始采用一些 SIFR 技术了。到目前为止,我已经能够很容易地弄清楚它,除了一两个问题。基本上,我有两个亟待解答的问题。

1) 多少 SIFR 被认为是“好的”?虽然我只使用 SIFR 作为标题,但根据常见问题解答/演练中的建议,我仍然有大量文本想要转换为 SIFR。请查看the website 了解我使用了多少 SIFR(Rockwell 字体标题和副标题)。是不是太过分了?

2) 如何使用 SIFR 控制字体颜色?显然我知道你可以在'sifr-config.js'文件中设置它。但是,我想使用许多不同颜色的标题。我目前正在这样做:

sIFR.replace(rockwell, {
selector: '.h3_sifr', css: '.sIFR-root { font-size: 18px; background-color: #a63f03; color: #bf7e04;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_green', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #597704;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_maroon', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #330000;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_blue', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #005995;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_cruise', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #016EA1;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_australia', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #277c5d;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_intl', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #1b2f15;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_us', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #32588b;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_hawaii', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #4a1e52;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_rail', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #304c2a;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_canada', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #0a2754;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_alaska', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #083c4b;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_sadc', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #630002;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_easternus', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #8b3100;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_lightgray', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #999999;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_medgray', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #666666;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_darkgray', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #333333;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_extended', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #175700;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});
sIFR.replace(rockwell, {
selector: '.h3_sifr_orange', css: '.sIFR-root { font-size: 18px; background-color: #FFFFFF; color: #a63f03;}', forceSingleLine: true, wmode: 'transparent', tuneHeight: -5,
});

现在,如您所见,我能够使用不同颜色的唯一方法是通过单独的替换语句为每种颜色。我尝试更改“内联”颜色(即<span class="h3_sifr" style="color:#123456></span>),但这不起作用。有什么建议吗?

【问题讨论】:

    标签: sifr


    【解决方案1】:

    我认为您使用的 sIFR 有点过多。尝试将其限制为仅主要标题,并且不要替换链接。

    CSS 问题有点棘手,没有简单的答案。不过,您可以将其他共享属性复制到 rockwell 对象,因此您不必重复这些操作。

    同时尽量避免使用透明度,我认为你不需要使用forceSingleLine

    【讨论】:

    • 我正在使用 forceSingleLine 因为 sifr 文本在被替换时会下降到第二行。如果不使用此属性,我无法弄清楚如何解决此问题。有小费吗?我会减少我对 SIFR 的使用,我的直觉是我可能使用了太多。感谢您的回复。
    • 可能 Flash 字体比 HTML 字体宽,这会导致布局出现问题。在.sIFR-active * 样式中使用letter-spacing 使HTML 文本更宽。
    猜你喜欢
    • 2011-02-28
    • 2011-02-04
    • 1970-01-01
    • 2010-11-04
    • 2010-09-22
    • 2012-09-23
    • 2012-01-20
    • 2014-01-15
    • 1970-01-01
    相关资源
    最近更新 更多