【发布时间】:2014-05-20 11:35:58
【问题描述】:
我有一个问题,剑道窗口没有正确居中。
这是一个演示问题的简单小提琴。所以剑道窗口在没有浏览器垂直滚动条的情况下有显示的空间,但是剑道窗口居中方法,将其置于中心位置,并强制浏览器滚动条出现。
小提琴:http://jsfiddle.net/codeowl/QKPN6/2/
HTML:
<div id="testWindow">
<p>here is the test content here is the test content</p>
<p>here is the test content here is the test content</p>
<p>here is the test content here is the test content</p>
<p>here is the test content here is the test content</p>
<p>here is the test content here is the test content</p>
<p>here is the test content here is the test content</p>
<p>here is the test content here is the test content</p>
<p>here is the test content here is the test content</p>
<p>here is the test content here is the test content</p>
<p>here is the test content here is the test content</p>
<p>here is the test content here is the test content</p>
<p>here is the test content here is the test content</p>
<p>here is the test content here is the test content</p>
</div>
JavaScript:
$(document).ready(function() {
var oWin = null;
$('#testWindow').kendoWindow();
oWin = $('#testWindow').data('kendoWindow');
oWin.center();
});
请告诉我如何让剑道窗口正确居中。
【问题讨论】:
-
不明白你想要什么。窗口正确居中,位于预览中心。详细解释。
-
感谢您的回复。看我问题中的图片。 kendo 窗口没有垂直居中,因为它上面有空间,并且由于该空间,它使垂直滚动条出现在浏览器中,如图所示。如果剑道窗口垂直居中正确,顶部的空间会更少,并且浏览器中没有垂直滚动条。
标签: javascript kendo-ui kendo-window