sifr“收缩”字体大小
我在使用 sifr2 的字体大小时遇到了一些问题,当文本太大而无法容纳单个“行”而不是换行符时(正如 sifr2 提供的演示 html 文件中发生的那样,文本为“Vanden Keere”) ,伊夫斯夫人在巴斯克维尔结婚”),它只是将 sifr 替换的文本缩小到较小的字体大小,以适应空间,奇怪的是,我没有使用此 css 标签的大小。
“有问题的”选择器是 h2.text,位于 class="bloq" DIV 中。
<div class="bloq">
<h2 class="text">text that drives me crazy 'cos it's soooo long</h2>
</div>
代码如下:
SIFR 代码:
// This is the preferred "named argument" syntax
sIFR.replaceElement(named({sSelector:"h2.text", sFlashSrc:swfurl, sColor:"#7d2384", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingRight:0, nPaddingBottom:0, nPaddingLeft:0, sWmode:"transparent" }));
SIFR.screen CSS 代码:
.sIFR-hasFlash h2.text {
visibility: hidden;
letter-spacing: -9px;
font-size: 14px;
}
mystyle CSS 代码:
h2{
height: 62px;
background-repeat: no-repeat;
background-position: bottom left;
text-indent: -9999px;
padding: 0px;
display: block;
}
h2.text{
padding-left: 10px;
padding-right: 10px;
font-weight: bold;
font-size: 12px;
color: #7d2384;
margin-bottom: 10px;
text-indent: 0px;
height: auto;
}
.bloq{padding-left: 11px; float: left; width: 300px;}
提前致谢。
PS。另外,我注意到在最新的 Safari 版本中,sBgColor:"#FFFFFF" 属性存在一些问题,sColor:"#7d2384" 效果很好,但 sBgColor 总是变成绿色。
太多浏览器..太多版本:P
i'm having some trouble with the font size using sifr2, when the text is too big to fit a single "line", instead of a line break (as it happens in the demo html files provided with sifr2 with the text "Vanden Keere, Mrs. Eaves wed in Baskerville"), it justs shrinks the sifr-replaced text to a smaller font-size, in order to fit the space, the weird thing, is that i'm not using sizes for this css tag.
The "problematic" selector is h2.text, located into a class="bloq" DIV.
<div class="bloq">
<h2 class="text">text that drives me crazy 'cos it's soooo long</h2>
</div>
Here's the code:
SIFR code:
// This is the preferred "named argument" syntax
sIFR.replaceElement(named({sSelector:"h2.text", sFlashSrc:swfurl, sColor:"#7d2384", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingRight:0, nPaddingBottom:0, nPaddingLeft:0, sWmode:"transparent" }));
SIFR.screen CSS CODE:
.sIFR-hasFlash h2.text {
visibility: hidden;
letter-spacing: -9px;
font-size: 14px;
}
mystyle CSS CODE:
h2{
height: 62px;
background-repeat: no-repeat;
background-position: bottom left;
text-indent: -9999px;
padding: 0px;
display: block;
}
h2.text{
padding-left: 10px;
padding-right: 10px;
font-weight: bold;
font-size: 12px;
color: #7d2384;
margin-bottom: 10px;
text-indent: 0px;
height: auto;
}
.bloq{padding-left: 11px; float: left; width: 300px;}
Thanks in advance.
PS. Also, i've noticed that in the latest Safari version, there's some trouble with the sBgColor:"#FFFFFF" property, sColor:"#7d2384" works good, but sBgColor is always turned into green.
Too many browsers .. too many releases :P
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
sIFR 3 不存在此问题。
sIFR 3 does not have this issue.