uni-app 全局 CSS 样式

uni-app About 603 words

App.vue

<style>
    /*每个页面公共css */
    page {
      min-height: calc(100vh - var(--status-bar-height) - var(--window-top) - var(--window-bottom));
      background-color: #F7F7F7;
    }
    
    page, view, text {
        box-sizing: border-box;
    }

    .flex-row {
        display: flex;
        gap: 20rpx;
    }

    .flex-column {
        display: flex;
        flex-direction: column;
        gap: 20rpx;
    }
    
    .flex1 {
        flex: 1;
    }
    
    .shadow {
        background-color: white;
        padding: 20rpx;
        border-radius: 20rpx;
    }
</style>

注意

uni-app中不能使用*选择器。

Views: 14 · Posted: 2025-08-13

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh