V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
leohxj
V2EX  ›  问与答

mobile 页面需要 rest css 吗?

  •  
  •   leohxj · Apr 3, 2014 · 2116 views
    This topic created in 4409 days ago, the information mentioned may be changed or developed.
    我一般只是:

    ```css
    * {
    margin:0;
    padding:0;
    border:0;
    outline:0;
    vertical-align:baseline;
    background:transparent;
    -webkit-touch-callout:none;
    -webkit-user-select:none;
    -webkit-text-size-adjust:none;
    }
    ```

    normalize.css感觉太大了,有少一点的类normalize样式吗?
    4 replies    1970-01-01 08:00:00 +08:00
    loading
        1
    loading  
       Apr 3, 2014 via iPhone
    自己根据用到的元素写一下,文件又小又好
    Sivan
        2
    Sivan  
       Apr 3, 2014
    不想用 normalize 的话,你用的通配符这种也是可以的,不会影响效率,但是后面几行可以只加到 html 上。
    flyingkid
        3
    flyingkid  
       Apr 3, 2014
    直接把normalize.css下回来自己改进一下就行了。比如有些标签根本不会用到的,直接删除。
    foru17
        4
    foru17  
       Apr 3, 2014
    @charset "utf-8";

    div,p,dl,dd,h1,h2,h3,h4,h5,h6,a,b,u,em,input,textarea,button,select,form,section,label,span,td,li,nav,footer,body,ul,i {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    word-wrap: break-word;
    word-break: break-all;
    padding: 0;
    margin: 0
    }

    ul,li,ol {
    list-style: none
    }

    a {
    text-decoration: none;
    color: #333
    }

    a,img,button {
    -webkit-touch-callout: none
    }

    a:focus,a:active,a:hover,input,button,textarea {
    outline: 0
    }

    table {
    border-collapse: collapse
    }

    body,td,input,textarea,option,select,button {
    font-family: "微软雅黑",helvetica,arial;
    font-size: 1em;
    -webkit-text-size-adjust: none
    }

    body,td,h3 {
    font-size: .95em;
    -webkit-user-select: none
    }

    .clearfix:after {
    content: '';
    display: block;
    overflow: hidden;
    visibility: hidden;
    clear: both
    }

    供参考
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2894 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 15:13 · PVG 23:13 · LAX 08:13 · JFK 11:13
    ♥ Do have faith in what you're doing.