如何在Angular、CSS、JavaScript或HTML中移除滚动条?

huangapple go评论91阅读模式
英文:

How to remove scrollbar in angular, css, js or html?

问题

我是前端新手,我已经搜索了这个问题,没有找到答案。有没有办法从这个图像页面中移除滚动条?或者有一些方法使页面高度稳定?

我的HTML页面

如何在Angular、CSS、JavaScript或HTML中移除滚动条?

我需要使这个页面无法滚动。

英文:

I am new in frontend, I have searched this issue and didn't find answer. Is there any way to remove scrollbar from this page in img? Or some ways to make page height stable?

my html page

如何在Angular、CSS、JavaScript或HTML中移除滚动条?

I need to make this page unscrollable

答案1

得分: 1

要在Angular应用程序中删除滚动条,您可以将CSS应用于body元素,将overflow属性设置为hidden。在您的Angular组件的CSS文件中添加以下内容:

body {
  overflow: hidden;
}
英文:

To remove the scrollbar in an Angular app, you can apply CSS to the body element to set the overflow property to hidden.
In your Angular component's CSS file, add

body {overflow: hidden;}

huangapple
  • 本文由 发表于 2023年3月15日 19:30:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/75744097.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定