【发布时间】:2023-03-31 06:50:01
【问题描述】:
我有一个demo page up here;您可以查看源代码以了解我要执行的操作。
如您所见,除了颜色之外,它的一切似乎都正常工作。我正在尝试将颜色设置为蓝色(#0000ff),但它保持为黑色。我为我的字体创建了一个自定义 SWF 文件,嵌入了单个字体的四种不同变体,以适应每个 these instructions 的不同样式(因为这个特定的字体系列将常规、粗体、斜体和粗斜体存储为四个不相交的字体名称)。
为了后代,我将从我链接到的演示页面中粘贴一些源代码:
<style type="text/css">
h1.sifr {
color: #0000ff;
font-family: 'Myriad Pro';
font-size: 1.75em;
margin-bottom: 0;
}
</style>
<script type="text/javascript">
var myriad_pro = {src: 'myriad_pro.swf'};
sIFR.activate(myriad_pro);
sIFR.replace(myriad_pro, {
selector: 'h1.sifr',
css: {
'.sIFR-root': {'color': '#0000ff', 'font-family' : 'Myriad Pro'},
'em': {'color': '#0000ff', 'font-family' : 'Myriad Pro Italic' , 'font-style' : 'plain'},
'strong': {'color': '#0000ff', 'font-family' : 'Myriad Pro Bold' , 'font-weight' : 'normal'},
'em strong, strong em': {'color': '#0000ff', 'font-family' : 'Myriad Pro Bold Italic' , 'font-style' : 'plain', 'font-weight' : 'normal'}}
}
);
</script>
我忘记了什么?如何让颜色发挥作用?
【问题讨论】:
标签: javascript css flash sifr