Sifr3 替换元素周围的额外填充
我正在使用 sifr3 来替换一些标题。其中之一具有背景颜色。 普通页面 css 将 h2 填充设置为 0,sifr css 对于替换的 h2 具有相同的内容,并且 sifrconfig.js 具有相同的内容,但似乎仍然有填充,底部稍多一些。
主要 css:
h2 {
font-size: 22px;
margin-bottom: 30px;
padding:0;
background-color: #339999;
width: 280px;
}
sifr css:
.sIFR-active h2 {
visibility: hidden;
font-family: Verdana;
line-height: 1em;
font-size: 22px;
}
sifrconfig.js:
sIFR.replace(rockwell, {
selector: 'h2',
forceSingleLine: true,
css: [
'.sIFR-root { color:#FFFFFF; font-size: 22px; letter-spacing:-0.87; background-color: #339999; text-align: left; margin:0; padding:0;}',
]
});
有什么想法吗?这让我抓狂!
编辑值得一提的是,没有内联样式或任何其他 css 会覆盖任何内容,并且使用 Web 开发人员工具栏,它显示 Flash 影片具有额外的高度,而不是包含的 h2。
I am using sifr3 to replace a few headings. One of them has a background color.
The normal page css has h2 padding set to 0, the sifr css has the same for the replaced h2, anf the sifrconfig.js has the same, yet there still appears to be padding, slighly more on the bottom.
main css:
h2 {
font-size: 22px;
margin-bottom: 30px;
padding:0;
background-color: #339999;
width: 280px;
}
sifr css:
.sIFR-active h2 {
visibility: hidden;
font-family: Verdana;
line-height: 1em;
font-size: 22px;
}
sifrconfig.js:
sIFR.replace(rockwell, {
selector: 'h2',
forceSingleLine: true,
css: [
'.sIFR-root { color:#FFFFFF; font-size: 22px; letter-spacing:-0.87; background-color: #339999; text-align: left; margin:0; padding:0;}',
]
});
Any ideas? This is driving me mad!
EDIT just worth mentioning, there is no inline styles or any other css that would override anything, and using web developer toolbar, it shows the flash movie has the extra height, not the containing h2.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嘿,我遇到了类似的问题,我在底部有一些额外的填充,位于我试图转换 SIFR 的 H2 标签的底部。
我发现我的问题与我使用的文档类型有关。
我使用的是 XHTML Strict,当我将其更改为过渡文档类型时,填充被删除。
我希望这对人们有帮助,我浪费了一天的时间,并且完全费尽心思试图找到它并修复它。
Hey, I had a similar problem where I had some extra padding at the bottom which was at the bottom of the H2 tag I was trying to convert SIFR.
I found my issues was related to the doc type I was using.
I was using an XHTML Strict and when I changed it to a transitional doc type the padding was removed.
I hope this helps people, I wasted a day and went completely f-ing mental trying to track it down and fix it.
是的,Flash 有时会这样做。您可以使用
tuneHeight
参数来降低影片的高度。还有tuneWidth
、offsetTop
和offsetLeft
。Yea, Flash does that at times. You can use the
tuneHeight
parameter to make the movie less high. There's alsotuneWidth
,offsetTop
andoffsetLeft
.