开发者

Disable Scrollbar conditionally without javascript

i want to hide the scrollbar conditionally i.e. i want to hide the scro开发者_如何学Pythonllbar of the body when javascript is disabled and enabling it when javascript is enabled because in my page iam showing an message when javascript is disabled and not allowing to user to do anything by graying out the whole screen but as the height for different pages are different so iam using a big height in that case the scrollbar is creating problem in case of small height pages.


You can apply a style inside the noscript tag.

Just do as shown below;

<noscript>
     <style>
         body { width:100%; height: 100%; overflow:hidden; }
     </style>
</noscript>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜