[关闭]
@Fartown 2017-03-07T14:43:17.000000Z 字数 876 阅读 525

默认样式重置

样式,css,resset


统一样式重置

  1. input类型

    1. input{
    2. outline:none;
    3. border-width:0;
    4. }
  2. 盒子模型

    1. div{
    2. box-sizing:border-box;
    3. -moz-box-sizing:border-box; /* Firefox */
    4. -webkit-box-sizing:border-box; /* Safari */
    5. }
  3. 默认边距

    1. *{
    2. padding:0;
    3. margin:0;
    4. }
  4. ul,ol,a
  1. ul,ol{
  2. list-style: none;
  3. }
  4. a{
  5. text-decoration:none;
  6. }
  1. table样式
  1. table {
  2. border-collapse: collapse;
  3. border-spacing: 0;
  4. }

IOS下的样式问题

  1. 默认button样式及圆角:
  1. input{
  2. -webkit-appearance:none;
  3. border-radius: 0;
  4. }
  1. 点击之后样式
  1. a,button,input,textarea{
  2. -webkit-tap-highlight-color: rgba(0,0,0,0;)
  3. }

chrome浏览器

  1. input输入框高光

    1. input:focus{
    2. -webkit-tap-highlight-color:rgba(0,0,0,0);
    3. -webkit-user-modify:read-write-plaintext-only;
    4. }

移动端开发默认设置

  1. meta设置
  1. <meta name="viewport" content="initial-scale=1.0, maximum-scale=1, user-scalable=no, width=device-width">
  2. <meta name="apple-mobile-web-app-capable" content="yes" />
  3. <meta name="apple-mobile-web-app-title" content="">
  4. <meta name="apple-mobile-web-app-status-bar-style" content="" />
  5. <base target="_blank">
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注