• css常用样式设置


    设置用户不能选择文字:

    body,
    .noselect {
        -webkit-touch-callout: none;
        /* iOS Safari */
        -webkit-user-select: none;
        /* Chrome/Safari/Opera */
        -khtml-user-select: none;
        /* Konqueror */
        -moz-user-select: none;
        /* Firefox */
        -ms-user-select: none;
        /* Internet Explorer/Edge */
        user-select: none;
        /* Non-prefixed version, currently
        not supported by any browser */
    }

    图片初始化:

    img {
        max- 100%;
        max-height: 100%;
        display: block;
        margin: 0 auto;
    }

    设置隐藏:

    .hidden {
        display: none;
    }

     浏览器初始化:

    // 盒模型
    body,
    div,
    dl,
    dt,
    dd,
    ul,
    ol,
    li,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    pre,
    code,
    form,
    fieldset,
    legend,
    input,
    button,
    textarea,
    p,
    blockquote,
    th,
    td {
        margin: 0;
        padding: 0;
    }
    // 表格
    table {
        border-collapse: collapse;
        border-spacing: 0;
    }
    // 列表
    li {
        list-style: none;
    }
    // 标题
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        font-size: 100%;
        font-weight: normal;
    }
    // 表单
    input,
    button,
    textarea,
    select,
    optgroup,
    option {
        font-family: inherit;
        font-size: inherit;
        font-style: inherit;
        font-weight: inherit;
    }
    input,
    button,
    textarea,
    select {
        *font-size: 100%;
    }
    select,
    input,
    select {
        vertical-align: middle;
    }
    // 链接
    a {
        text-decoration: none;
    }
  • 相关阅读:
    ES6 函数的扩展2
    css3 UI元素状态伪类选择器
    HTML5 矩阵变换
    ES6 let和const命令(4)
    ES6 let和const命令(3)
    ES6 let和const命令(2)
    JVM的内存区域划分(一)
    MySQL的四种事务隔离级别
    快速排序
    Struts2与SpringMVC的区别
  • 原文地址:https://www.cnblogs.com/maoriaty/p/8072262.html
Copyright © 2020-2023  润新知