1. 程式人生 > 其它 >基於頁面的通用樣式專案全域性使用 html樣式

基於頁面的通用樣式專案全域性使用 html樣式

1.index專案通用樣式使用

// 要有通用樣式 -- 系統字型
/* 全域性頁面通用配置 ----start----*/
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, "Hiragino Sans GB", "微軟雅黑", Arial, sans-serif;

    &:before,
    &:after {
        -webkit-box-sizing: border-box
; -moz-box-sizing: border-box; box-sizing: border-box; } } html { overflow: hidden; height: 100%; font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Helvetica, "Hiragino Sans GB", "微軟雅黑", Arial, sans-serif; font-size: 20px; // 預設字型大小:16px -ms-text-size-adjust
: 100%; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } body { position: relative; height: 100%; margin: 0; font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Helvetica, "Hiragino Sans GB", "微軟雅黑", Arial, sans-serif; font-size: 20px; line-height
: 1.42857143; color: #333; background-color: #fff; article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block; } } audio, canvas, progress, video { display: inline-block; vertical-align: baseline; } a { text-decoration: none; } ul { list-style: none; margin: 0; padding: 0; } /* 全域性頁面通用配置 ----end----*/