fix:滚动条彻底移除

This commit is contained in:
MKStoler 2024-10-10 16:24:26 +08:00
parent aa685cb2b8
commit 055e2a6849
3 changed files with 43 additions and 2 deletions

View File

@ -5,10 +5,20 @@
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DSZ Exam Showboard</title>
<style>
/* 隐藏滚动条 */
body {
overflow: hidden;
}
/* 适用于所有滚动容器 */
.no-scrollbar {
overflow: hidden;
}
</style>
</head>
<body>
<div id="app"></div>
<div id="app" class="no-scrollbar"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

View File

@ -25,4 +25,16 @@ app.use(VueShowdownPlugin, {
registerPlugins(app);
// 添加全局样式来隐藏滚动条
const style = document.createElement('style');
style.innerHTML = `
body {
overflow: hidden;
}
.no-scrollbar {
overflow: hidden;
}
`;
document.head.appendChild(style);
app.mount('#app');

View File

@ -1,7 +1,7 @@
/**
* plugins/vuetify.js
*
* Framework documentation: https://vuetifyjs.com`
* Framework documentation: https://vuetifyjs.com
*/
// Styles
@ -13,6 +13,25 @@ import { createVuetify } from 'vuetify';
import { md3 } from 'vuetify/blueprints';
// 添加全局样式来隐藏滚动条
const style = document.createElement('style');
style.innerHTML = `
body {
overflow: hidden;
}
.no-scrollbar {
overflow: hidden;
}
* {
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* Internet Explorer 10+ */
}
*::-webkit-scrollbar {
display: none; /* Safari and Chrome */
}
`;
document.head.appendChild(style);
// https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
export default createVuetify({
theme: {