ScrollWidth 宽度:26 -15*26=-390 调色板像素 默认:-333 -333 SmCaptionHeight:-525 SmCaptionWidth:-525
window.addEventListener('resize',function() {varscrollbarWidth =window.innerWidth>1024?8:10;document.documentElement.style.setProperty('--scrollbar-width', scrollbarWidth +'px'); }); 然后在您的CSS中,您可以使用var()函数来引用这个变量,例如:::-webkit-scrollbar { width: var(--scrollbar-width)...
Recommended 推荐的项目 More <Icon fafa="faChevronRight" width={8} /> @@ -184,7 +184,7 @@ export const StartMenu = () => { All apps 所有应用
<Rectangle Width="20" Height="20" Fill="{StaticResource SystemAccentColorLight2}" /> <Rectangle Width="20" Height="20" Fill="{StaticResource SystemAccentColorLight3}" /> </StackPanel> </StackPanel> </ScrollViewer> <control:TitleBar x:Name="TitleBar" />Binary...
使用JavaScript:如果您希望使用JavaScript来实现这个功能,您可以通过检查窗口的innerWidth属性来确定窗口的宽度,并据此设置滚动条的宽度。以下是一个示例: window.addEventListener('resize',function() {varscrollbarWidth =window.innerWidth>1024?8:10;document.documentElement.style.setProperty('--scrollbar-width', scr...