@tailwind base; @tailwind components; @tailwind utilities; :root { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-family: SourceHanSansCN-Regular, -apple-system, PingFang SC, Microsoft YaHei, Noto Sans CJK SC, WenQuanYi Micro Hei !important; } @font-face { font-family: 'SourceHanSansCN-Regular'; src: url('/fonts/SourceHanSansCN-Regular.subset.otf') format('truetype'); font-weight: normal; font-style: normal; } @font-face { font-family: 'SourceHanSansCN-bold'; src: url('/fonts/SourceHanSansCN-Regular.subset.otf') format('truetype'); font-weight: 700; font-style: normal; } body { /* ! 全局禁用鼠标选择,需要在其他位置放开 */ user-select: none; } .ant-slider-rail { background-color: #0000001a !important; } .ant-slider-track { background-color: #ffa94d !important; } @keyframes loading { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .loading { animation: loading 1s ease-in-out infinite; } /* 修改 antd 样式 */ .ant-btn .anticon { position: relative; top: -3px; } .ant-modal-content { background-color: rgba(255, 255, 255, 0.8) !important; backdrop-filter: blur(20px); } .ant-modal-header { background-color: transparent !important; } .viewer-backdrop { backdrop-filter: blur(10px); } /* 滚动条样式 */ ::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background-color: transparent; } ::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, 0.2); border-radius: 4px; } /* 背景之上阴影文字 */ .shadow-text { text-shadow: 0 0 0.3em rgba(0, 0, 0, 0.3); } .shadow-content { backdrop-filter: blur(20px); box-shadow: 0 0 1em 0 rgba(0, 0, 0, 0.2); } /* 默认动画 */ .v-enter-active, .v-leave-active { transition: opacity 0.3s ease-in-out; } .v-enter-from, .v-leave-to { opacity: 0; } /* 搜索框动画 */ .searchContent-enter-active, .searchContent-leave-active { transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out; } .searchContent-enter-from { transform: translateY(90%); opacity: 0; } .searchContent-leave-to { transform: translateY(110%); opacity: 0; } /* 弹框内容动画 */ .modal-enter-active, .modal-leave-active { transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out; } .modal-enter-from { transform: translate(-50%, -60%); opacity: 0; } .modal-leave-to { transform: translate(-50%, -40%); opacity: 0; } /* 设置框动画 */ .settings-enter-active, .settings-leave-active { transform-origin: left bottom; transition: transform 0.3s ease-in-out, bottom 0.3s ease-in-out, opacity 0.3s ease-in-out; } .settings-enter-from, .settings-leave-to { bottom: 0; opacity: 0; transform: scale(0.4); } /* 页面添加框动画 */ .page-adder-enter-active, .page-adder-leave-active { transform-origin: center bottom; transition: transform 0.3s ease-in-out, left 0.3s ease-in-out, opacity 0.3s ease-in-out; } .page-adder-enter-from, .page-adder-leave-to { opacity: 0; transform: scale(0.4); left: 0; } .no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; } .hover-move { transform: translateY(0); animation: none; transition-duration: 0.3s; transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); } .hover-move:hover { transform: translateY(-4px); } @layer utilities { .scrollbar-transparent::-webkit-scrollbar { width: 0; height: 0; } .scrollbar-hide::-webkit-scrollbar { width: 0; height: 0; } .scrollbar-hide { -ms-overflow-style: none; /* Internet Explorer 10+ */ scrollbar-width: none; /* Firefox */ } .scrollbar-transparent::-webkit-scrollbar-thumb { background-color: transparent; } .scrollbar-transparent::-webkit-scrollbar-track { background-color: transparent; } .scrollbar-transparent { scrollbar-width: thin; scrollbar-color: transparent transparent; } } .background-enter-active { animation: bounce-in 0.8s; } @keyframes bounce-in { 0% { transform: scale(1); } 50% { transform: scale(1.25); } 100% { transform: scale(1); } }