• css公共样式


    建议是找到其中自己需要的,不要全盘照搬

    第一种PC端公共样式:

    html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, 
    strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, 
    tfoot, thead, tr, th, td ,textarea,input { margin:0; padding:0;  }
    address,cite,dfn,em,var, i {font-style:normal;}
    body {font-size: 16px; line-height: 1.5; font-family:'Microsoft Yahei','simsun','arial','tahoma';  color: #333; }
    table { border-collapse:collapse; border-spacing:0; }
    h1, h2, h3, h4, h5, h6, th { font-size: 100%; font-weight: normal; }
    button,input,select,textarea{font-size:100%;}
    fieldset,img{border:0;}
    a,
    img {
        -webkit-touch-callout: none
    }
    a,
    a:active,
    a:focus,
    a:hover,
    a:visited {text-decoration: none}
    input[type=password],
    input[type=text],
    textarea {
        resize: none;
        outline: 0;
        -webkit-appearance: none;
        white-space: pre-wrap;
        word-wrap: break-word;
        background: #fff
    }
    ul, ol { list-style: none; }
    :focus{ outline:none;}
    .clearfix{ clear: both; content: ""; display: block; overflow: hidden }
    .clear{clear: both;}
    .fl{ float: left; }
    .fr{float: right;}

    第二种移动端公共样式:

     

    /*reset*/
    html{max- 640px;margin:0 auto;}
    article,aside,dialog,footer,header,section,footer,nav,figure,menu{display:block}
    body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, figure, section, legend, textarea, p, blockquote, th, td, input, select, textarea, button { margin: 0; padding: 0 }
    body{font:14px/1.4 "Microsoft Yahei",Arial,Helvetica,sans-serif;background-color: #fff;color:#424242;max- 640px;margin: 0 auto;}
    h1,h2,h3,h4,h5,h6{font-size:100%;font-weight: normal;}
    table{border-collapse:collapse;border-spacing:0}
    ul,ol,dd,dt,dl{list-style-type:none;}
    a{color:#333;text-decoration: none;-webkit-touch-callout: none;-webkit-user-select: none;}
    a,input,select,span{-webkit-tap-highlight-color: transparent;-webkit-appearance: none;-moz-appearance: none;-webkit-border-radius: 0;}

    input,img{border:none;padding:0;font-size:14px;}

    i,em{font-style:normal;}
    :focus{outline: none}

    
    

    /*iphone6*/
    @media(min-device-375px)and(max-device-667px)and(-webkit-min-device-pixel-ratio:2){body{font-size:14.5px;}}
    /*iphone6plus*/
    @media(min-device-414px) and (max-device-736px) and (-webkit-min-device-pixel-ratio:3){body{font-size:15.5px;}}

    
    

    /*原子类*/
    .clear { clear: both; }
    .clear:after { display: block; clear: both; visibility: hidden; height: 0; overflow: hidden; content: "."; }
    .fl { float: left; }
    .fr { float: right; }
    .mb10{margin-bottom: 10px;}
    .mt10{margin-top: 10px;}
    /*placeholder css*/
    ::-moz-placeholder{ font-family: "Microsoft YaHei"}
    ::-webkit-input-placeholder{ font-family: "Microsoft YaHei"}
    ::-ms-input-placeholder{ font-family: "Microsoft YaHei"}

     
    (一)-webkit-tap-highlight-color
            这个属性只用于iOS (iPhone和iPad)。当你点击一个链接或者通过Javascript定义的可点击元素的时候,它就会出现一个半透明的灰色背景。要重设这个表现,你可以设置-webkit-tap-highlight-color为任何颜色。
    想要禁用这个高亮,设置颜色的alpha值为0即可。
    示例:设置高亮色为50%透明的红色:
    -webkit-tap-highlight-color: rgba(255,0,0,0.5);
    浏览器支持: 只有iOS(iPhone和iPad).
  • 相关阅读:
    【题解】 bzoj2748 [HAOI2012]音量调节 (动态规划)
    【题解】 bzoj1190: [HNOI2007]梦幻岛宝珠 (动态规划)
    【题解】 bzoj1864: [Zjoi2006]三色二叉树 (动态规划)
    【题解】 [ZJOI2006]书架 (Splay)
    【题解】 [HNOI2004]宠物收养场(Splay)
    【题解】 [HNOI2002]营业额统计 (Splay)
    【题解】 [ZJOI2008] 泡泡堂(贪心/二分图/动态规划)
    【题解】 [SDOI2009] Elaxia的路线(最短路+拓扑排序)
    Aptana Studio 3 如何汉化,实现简体中文版
    js中获得当前时间是年份和月份
  • 原文地址:https://www.cnblogs.com/huanghuali/p/6830481.html
Copyright © 2020-2023  润新知