【发布时间】:2015-09-06 06:49:25
【问题描述】:
我的 mvc 应用程序有 kendo 网格,我使用 position:absolute; 作为我的表的 tr:firstChild, td:firstChild 来实现列冻结。
最近,我们在我们的服务器上更新到 Chrome 45,在 Chrome 中,表格像 和所有其他浏览器(包括以前版本的 Chrome)正在呈现我的表格格式正确 .
我什至无法检查我的 chrome 中的那个空白区域。
我找到的解决方案:
我写了一些 CSS 即:
@media screen and (-webkit-min-device-pixel-ratio:0) {
.tablexyz tbody th:first-child,
.tablexyz tbody tr:first-child {
position: relative;
width: 240px;
top: auto;
left: 20px;
}
}
然后我在我的页面中使用 jQuery 并手动将其设置为绝对并且它工作正常:
$(".tablexyz tbody th:first-child").css({
position: "absolute",
width:"240px",
top:"auto",
left : "20px"
});
是什么导致了主要问题?如何仅使用 CSS 解决此问题?
【问题讨论】:
-
错字? “第一个孩子”
-
是的,错字先生...
-
如果您的代码在版本 44 中没有问题,请尝试更新到新版本 45.0.2454.93 m。就我而言,该错误已修复:) 希望这会有所帮助。干杯
标签: jquery css google-chrome kendo-grid