要取消滚动条,只需要将<body>标签样式的overflow-x或overflow-y设置为hidden即可,其中overflow-x为左右滚动条,overflow-y为上下滚动条,代码示例如下:

1
2
3
4
5
6
7
8
9
10
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title>title</title>
</head>
<body style="overflow-x: hidden">

</body>
</html>