mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
Enhance modal styles and add scrollbar width calculation for improved layout
This commit is contained in:
@@ -32,6 +32,18 @@
|
||||
<!-- 添加资源加载策略 -->
|
||||
<link rel="preconnect" href="https://civitai.com">
|
||||
<link rel="preconnect" href="https://cdnjs.cloudflare.com">
|
||||
|
||||
<script>
|
||||
// 计算滚动条宽度并设置CSS变量
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const scrollDiv = document.createElement('div');
|
||||
scrollDiv.style.cssText = 'width:100px;height:100px;overflow:scroll;position:absolute;top:-9999px;';
|
||||
document.body.appendChild(scrollDiv);
|
||||
const scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
|
||||
document.body.removeChild(scrollDiv);
|
||||
document.documentElement.style.setProperty('--scrollbar-width', scrollbarWidth + 'px');
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="corner-controls">
|
||||
|
||||
Reference in New Issue
Block a user