简体   繁体   English

Slimbox以整页为中心,而不是窗口

[英]Slimbox centering on whole page, not the window

I was trying to integrate Slimbox into my web page, but couldn't get it to work properly. 我试图将Slimbox集成到我的网页中,但无法让它正常工作。 For some reason, the popup is centered on the whole page, not just its visible part. 出于某种原因,弹出窗口以整个页面为中心,而不仅仅是其可见部分。 Here's an example of the situation: here . 以下是这种情况的一个例子: 这里

I tested it in Firefox and Chrome on Linux and Slimboxes on other web pages look fine. 我在Firefox中测试了它,Linux上的Chrome和其他网页上的Slimboxes看起来很好。 Any idea how to get it working? 知道如何让它工作吗?

Also remember about <!DOCTYPE html> in HTML5 documents. 还要记住HTML5文档中的<!DOCTYPE html> In my case, this turned out to be important in Slimbox 2.05! 就我而言,这在Slimbox 2.05中变得非常重要!

So I change the doctype from HTML 4.0 Transitional to XHTML 1.0 Transitional and it works like magic. 所以我将doctype从HTML 4.0 Transitional更改为XHTML 1.0 Transitional,它就像魔术一样。 Does anybody know why? 有人知道为什么吗? There's something about having a XHTML doctype in Slimbox 1 readme, but they don't mention it in the readme to version 2. 有一些关于在Slimbox 1自述文件中使用XHTML文档类型的东西,但他们没有在版本2的自述文件中提及它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM