sIFR - 行高问题仅在 Firefox 3 中出现?

发布于 2024-07-15 09:21:13 字数 2047 浏览 7 评论 0原文

我正在尝试使用 sIFR 为我正在工作的主页创建标签云效果在。 有 4 行文本,每行内有不同的字体大小和字体颜色。

我怀疑 sIFR 纯粹主义者会说这会创建太多影片剪辑以确保安全,但这确实是我们正在寻找的效果,也是我们拥有的最佳选择,对于 SEO 并将正常降级。 如果我们能让它工作,那就是......

我遇到的问题是颜色、字体大小等都显示得很好,但文本周围似乎有过多的填充,产生了线条的效果-高度比 200% 或 1 em 更接近 200%。 我在 Internet Explorer 7 和其他一些浏览器中工作正常,但 Firefox 似乎显示所有内容都是错误的!

任何想法和帮助表示赞赏;)

<h1 style="font-weight:600;">
<span class="titleleft">Content </span>
<span class="titleright">Formula:</span>
<span class="focussed">Focused </span>
<span class="creative">creative </span>
<span class="and">and </span>
<span class="targeted">targeted </span>
<span class="content">content </span>
<span class="for">for </span>
<span class="bluechip">blue chip </span>
<span class="global">global </span>
<span class="websites">websites </span>
<span class="and2">and </span>
<span class="intranets">intranets. </span>
<span class="wedeliver">We deliver </span>
<span class=success>success </span>
<span class="witha"> with a </span>
<span class="degree">360 degree </span>
<span class="approach">approach to online</span><br />
<span class="communications">communications.</span>
</h1>

示例配置行:

sIFR.replace(arial, 
{selector: '#main_content_left_home>h1>span.titleleft' 
,css: '.sIFR-root { color: #000000; font-weight:bold;letter-spacing: -1;}' 
,tuneWidth: (+10)
});

sIFR.fixWrap = false;
sIFR.fitExactly = true;
sIFR.useStyleCheck = false;
sIFR.useDomLoaded = false;
sIFR.preserveSingleWhitespace = true;
sIFR.autoInitialize = true;
sIFR.forceWidth = true;
sIFR.repaintOnResize = true;

I'm trying to use sIFR to create a tag cloud effect for a homepage I'm working on. There are 4 lines of text, with various font sizes and font colours within each line.

I suspect sIFR purists would say this creates too many movie clips to be safe, but it really is the effect we're looking for and it's the best option we have which is good for SEO and will degrade gracefully. If we can get it working, that is...

The problem I'm having is that the colours, font sizes, etc. all display just fine, but there seems to be excessive padding around the text, creating the effect that the line-height is nearer 200% than 200% or 1 em. I've got it working OK in Internet Explorer 7 and some other browsers, but Firefox seems to be displaying everything all wrong!

Any ideas and help appreciated ;)

<h1 style="font-weight:600;">
<span class="titleleft">Content </span>
<span class="titleright">Formula:</span>
<span class="focussed">Focused </span>
<span class="creative">creative </span>
<span class="and">and </span>
<span class="targeted">targeted </span>
<span class="content">content </span>
<span class="for">for </span>
<span class="bluechip">blue chip </span>
<span class="global">global </span>
<span class="websites">websites </span>
<span class="and2">and </span>
<span class="intranets">intranets. </span>
<span class="wedeliver">We deliver </span>
<span class=success>success </span>
<span class="witha"> with a </span>
<span class="degree">360 degree </span>
<span class="approach">approach to online</span><br />
<span class="communications">communications.</span>
</h1>

Sample configuration line:

sIFR.replace(arial, 
{selector: '#main_content_left_home>h1>span.titleleft' 
,css: '.sIFR-root { color: #000000; font-weight:bold;letter-spacing: -1;}' 
,tuneWidth: (+10)
});

sIFR.fixWrap = false;
sIFR.fitExactly = true;
sIFR.useStyleCheck = false;
sIFR.useDomLoaded = false;
sIFR.preserveSingleWhitespace = true;
sIFR.autoInitialize = true;
sIFR.forceWidth = true;
sIFR.repaintOnResize = true;

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何止钟意 2024-07-22 09:21:13

检查额外的大小是否位于 Flash 影片内部或周围。 在后一种情况下,您将不得不求助于 CSS 调整。

在前一种情况下,请检查 sIFR 的 tuneHeight / tuneWidthoffsetTop / offsetLeft 参数。替换()。 这些使您可以更改 Flash 影片中文本的位置,并可以更改 Flash 影片在文本周围留出的边距。

有时这是必要的,因为 Flash 错误地报告了文本的尺寸。

Check whether the extra size is inside the Flash movie, or around it. In the latter case, you'll have to resort to CSS tweaking.

In the former case, check out the tuneHeight / tuneWidth and offsetTop / offsetLeft arguments for sIFR.replace(). These let you change position of the text inside the Flash movie and let you change how much margin the Flash movie leaves around the text.

This is sometimes necessary because the dimensions of the text are reported incorrectly by Flash.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文