*, *::before, *::after { box-sizing: border-box; /* 使用更直观的盒模型 */ margin: 0; padding: 0; } $taskBarHeight: 40px; .desktop-root { @apply w-full h-full flex flex-col; .desktop-container { @apply w-full h-full flex-1 p-2 pos-relative; background-image: url("../imgs/desktop-bg-2.jpeg"); background-repeat: no-repeat; background-size: cover; height: calc(100% - #{$taskBarHeight}); } .desktop-icons-container { @apply w-full h-full flex-1 grid grid-auto-flow-col pos-relative; } .task-bar { @apply w-full bg-gray-200 flex justify-center items-center; height: $taskBarHeight; flex-shrink: 0; } }