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;
}
原文地址:https://www.cnblogs.com/maoriaty/p/8072262.html