V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
leohxj
V2EX  ›  问与答

mobile 页面需要 rest css 吗?

  •  
  •   leohxj · 2014-04-03 14:07:09 +08:00 · 1658 次点击
    这是一个创建于 3690 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我一般只是:

    ```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 条回复    1970-01-01 08:00:00 +08:00
    loading
        1
    loading  
       2014-04-03 14:42:39 +08:00 via iPhone
    自己根据用到的元素写一下,文件又小又好
    Sivan
        2
    Sivan  
       2014-04-03 15:04:56 +08:00
    不想用 normalize 的话,你用的通配符这种也是可以的,不会影响效率,但是后面几行可以只加到 html 上。
    flyingkid
        3
    flyingkid  
       2014-04-03 15:30:38 +08:00
    直接把normalize.css下回来自己改进一下就行了。比如有些标签根本不会用到的,直接删除。
    foru17
        4
    foru17  
       2014-04-03 15:31:37 +08:00
    @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
    }

    供参考
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5741 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 06:57 · PVG 14:57 · LAX 23:57 · JFK 02:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.