[英]How to remove a scrollbar in a sharepoint hosted App from internet Explorer
[英]Remove the scrollbar in internet explorer
我有一個布局頁面,每個頁面都使用。 在這些Cshtml頁面中,我需要從某些頁面中刪除滾動條。 我提供了一個代碼,該代碼在谷歌瀏覽器中正常運行,但是在Internet Explorer中失敗。 誰能幫我? 提前謝謝我的代碼在下面
document.getElementsByTagName('body')[0].style = 'overflow: hidden';
可能是html元素在IE中產生了滾動條。 嘗試這個:
document.getElementsByTagName('body')[0].style = 'overflow: hidden';
document.getElementsByTagName('html')[0].style = 'overflow: hidden';
我通常使用CSS來處理此問題,如下所示:
html
{
height: 100%;
margin: 0;
padding: 0;
overflow:hidden;
}
body
{
height: 100%;
margin: 0;
overflow:hidden;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.