2

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

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

1) 多少 SIFR 被认为是“好的”?虽然我只使用 SIFR 作为标题,但根据常见问题解答/演练中的建议,我仍然有大量文本想要转换为 SIFR。请查看该网站以了解我使用了多少 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>),但这不起作用。有小费吗?

4

1 回答 1

1

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

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

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

于 2009-03-05T09:54:23.890 回答