zoukankan      html  css  js  c++  java
  • 移动端样式初始化

    搜的:

    @charset "utf-8";
    
    /* 禁用iPhone中Safari的字号自动调整 */
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        /* 解决IOS默认滑动很卡的情况 */
        -webkit-overflow-scrolling : touch;
    }
    
    /* 禁止缩放表单 */
    input[type="submit"], input[type="reset"], input[type="button"], input {
        resize: none;
        border: none;
    }
    
    /* 取消链接高亮  */
    body, div, ul, li, ol, h1, h2, h3, h4, h5, h6, input, textarea, select, p, dl, dt, dd, a, img, button, form, table, th, tr, td, tbody, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        border: none;
        outline: none;
    }
    
    /* 设置HTML5元素为块 */
    article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
        display: block;
    }
    
    /* 图片自适应 */
    img {
        width: 100%;
        height: auto;
        width: auto9; /* ie8 */
        /*display: block;*/
        -ms-interpolation-mode: bicubic;/*为了照顾ie图片缩放失真*/
    }
    
    /* 初始化 */
    body, div, ul, li, ol, h1, h2, h3, h4, h5, h6, input, textarea, select, p, dl, dt, dd, a, img, button, form, table, th, tr, td, tbody, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
        margin: 0;
        padding: 0;
    }
    body {
        font: 12px/1.5 'Microsoft YaHei','宋体', Tahoma, Arial, sans-serif;
        color: #555;
        background-color: #F7F7F7;
    }
    button{
        border: none;
        outline: none;
        border-radius: 6px;
    }
    em, i {
        font-style: normal;
    }
    ul,li{
        list-style-type: none;
    }
    strong {
        font-weight: normal;
    }
    .clearfix:after {
        content: "";
        display: block;
        visibility: hidden;
        height: 0;
        clear: both;
    }
    .clearfix {
        zoom: 1;
    }
    a {
        text-decoration: none;
        color: #969696;
        font-family: 'Microsoft YaHei', Tahoma, Arial, sans-serif;
    }
    a:hover {
        text-decoration: none;
    }
    ul, ol {
        list-style: none;
    }
    h1, h2, h3, h4, h5, h6 {
        font-size: 100%;
        font-family: 'Microsoft YaHei';
    }
    img {
        border: none;
    }
    input{
        font-family: 'Microsoft YaHei';
    }
    /*单行溢出*/
    .one-txt-cut{
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    /*多行溢出 手机端使用*/
    .txt-cut{
        overflow : hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        /* -webkit-line-clamp: 2; */
        -webkit-box-orient: vertical;
    }
    /* 移动端点击a链接出现蓝色背景问题解决 */
    a:link,a:active,a:visited,a:hover {
        background: none;
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        -webkit-tap-highlight-color: transparent;
    }
    .w50{
        width: 50%;
    }
    .w25{
        width: 25%;
    }
    .w20{
        width: 20%;
    }
    .w33{
        width: 33.333333%;
    }
    .fl{
        float: left;
    }
    .fr{
        float: right;
    }
    .db{
        display: block !important;
    }
    .dn{
        display: none;
    }
    .borderBottom1px{
        position: relative;
    }
    .borderBottom1px:after{
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        border-bottom: 1px solid #e3e3e3;
        -webkit-transform:scaleY(.5);
        -webkit-transform-origin:0 0;
    }

    晓蓉的:

    body,
    html,
    div,
    p,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    ul,
    li,
    button,
    p,
    dl,
    dt,
    dd {
        -webkit-tap-highlight-color: transparent;
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }
    ul,
    ol {
        list-style-type: none;
        list-style-image: none;
    }
     
    html,
    body {
        -webkit-user-select: none;
        -moz-user-select: none;
        user-select: none;
        font-family: "Helvetica Neue", Helvetica, "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
        -webkit-font-smoothing: antialiased;
        height: 100%;
    }
    body,
    button,
    input,
    select,
    textarea {
        border: none;
        background: transparent;
        border: none;
        outline: 0;
        color: #666;
    }
     
    input::-webkit-input-placeholder {
        color: $placeholder-color;
    }
     
    input {
        width: 100%;
        height: 100%;
        background: transparent;
    }
     
    textarea {
        overflow: auto;
        vertical-align: top;
        resize: vertical;
    }
     
    input[type='date'],
    input[disabled] {
        background: transparent;
    }
     
    .ft-pfr {
        font-family: "PingFang SC Regular";
    }
     
    .ft-pfm {
        font-family: "PingFang SC Medium";
    }
     
    .ft-pfb {
        font-family: "PingFang SC Bold";
        font-weight: 700;
    }
     
    a,
    img {
        -webkit-touch-callout: none;
    }
     
    a {
        text-decoration: none;
        color: $link-color;
    }
     
    a:active,
    a:hover {
        outline: 0 none;
    }
     
    a:focus {
        outerline: 1px dotted;
        /*no*/
    }
     
    img {
        vertical-align: middle;
        width: 100%;
        display: block;
    }
    .hide {
        display: none!important;
    }
     
    .show {
        display: block!important;
    }
     
    .tx-c {
        text-align: center;
    }
     
    .tx-r {
        text-align: right;
    }
     
    .tx-l {
        text-align: left;
    }
     
    .bold {
        font-weight: 700;
    }
     
    .ellipsis {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
     
    .fl {
        float: left;
    }
     
    .fr {
        float: right;
    }
     
    .clearfix {
        display: inline-table;
        display: block;
        zoom: 1;
    }
     
    .clearfix:after {
        clear: both;
        content: ".";
        display: block;
        height: 0;
        visibility: hidden;
    }
     
    .pre {
        position: relative;
    }
     
    .hidden {
        overflow: hidden;
    }

    chzhen的:

    a, body, dd, div, dl, dt, footer, h1, h2, h3, h4, h5, h6, header, html, i, img, input, li, ol, p, section, span, td, th, ul {
        margin: 0;
        padding: 0
    }
    
    li, ol, ul {
        list-style-type: none
    }
    
    a {
        text-decoration: none
    }
    
    i {
        font-style: normal
    }
    
    .fl {
        float: left
    }
    
    .fr {
        float: right
    }
    
    .clearfix:after {
        content: "";
        height: 0;
        line-height: 0;
        display: block;
        clear: both;
        visibility: hidden
    }
    
    body {
        background-color: #fff
    }
    
    p {
        padding: 0;
        margin: 0
    }
    
    a:hover {
        text-decoration: none !important
    }
    
    * {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none
    }
    
    input {
        -webkit-user-select: auto
    }
    
    .footer {
        width: 100%;
        height: 0.222222rem;
        background-color: #f8f8f8
    }
    
    html {
        color: #000;
        background: #fff;
        overflow-y: scroll;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%
    }
    
    html * {
        outline: 0;
        -webkit-text-size-adjust: none;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0)
    }
    
    html, body {
        font-family: sans-serif
    }
    
    body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
        margin: 0;
        padding: 0
    }
    
    input, select, textarea {
        font-size: 100%
    }
    
    table {
        border-collapse: collapse;
        border-spacing: 0
    }
    
    fieldset, img {
        border: 0
    }
    
    abbr, acronym {
        border: 0;
        font-variant: normal
    }
    
    del {
        text-decoration: line-through
    }
    
    address, caption, cite, code, dfn, em, th, var {
        font-style: normal;
        font-weight: 500
    }
    
    ol, ul {
        list-style: none
    }
    
    caption, th {
        text-align: left
    }
    
    h1, h2, h3, h4, h5, h6 {
        font-size: 100%;
        font-weight: 500
    }
    
    q:before, q:after {
        content: ''
    }
    
    sub, sup {
        font-size: 75%;
        line-height: 0;
        position: relative;
        vertical-align: baseline
    }
    
    sup {
        top: -.5em
    }
    
    sub {
        bottom: -.25em
    }
    
    a:hover {
        text-decoration: underline
    }
    
    ins, a {
        text-decoration: none
    }

    //以后再看提取一个最简最好的。

  • 相关阅读:
    图数据库查询语言
    深入探索Spring Data JPA, 从Repository 到 Specifications 和 Querydsl
    axios 浏览器内存泄露问题解决
    给Swagger换一套皮肤 Knife4j集成记录
    根据经纬度和半径计算经纬度范围
    最火 Web 前端组态软件 (可视化)
    Python-----删除给定目录下的所有文件
    Python----发送邮件yagmail
    python------将"["1","2"]"类型是字符串,转换为["1","2"]类型为列表,即eval()用法
    python----自动生成requirements.txt与导入requirements.txt中的库
  • 原文地址:https://www.cnblogs.com/wulinzi/p/8654037.html
Copyright © 2011-2022 走看看