Style reset code
/********** reset.css *********/
body,
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,
menu,
nav,
section {
margin: 0;
padding: 0;
border: 0;
}
/* 按钮文本不可选 */
button {
user-select: none;
}
img {
vertical-align: middle;
}
/* 加载不出来的图片不要显示灰色边框 */
img:not([src]),
img[src=""] {
opacity: 0;
}
ul,
ol {
list-style: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
input,
select,
button,
textarea {
font-size: 100%;
font: inherit;
}
html,
body {
height: 100%;
overflow-x: hidden;
}
a {
text-decoration: none;
outline: none;
}
a:active {
outline: 0;
}
.clearfix {
zoom: 1;
}
.clearfix:before,
.clearfix:after {
content: "";
display: table;
}
.clearfix:after {
clear: both;
}
em {
font-style: normal;
}
input {
outline: none;
}
input[type="text"],
input[type="tel"] {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
/* 去除iphone ipad 设备默认按钮样式 */
input[type="button"],
input[type="submit"],
input[type="reset"] {
-webkit-appearance: none;
border-radius: 0;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
input::-moz-placeholder,
textarea::-moz-placeholder {
color: #cccccc;
}
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
color: #cccccc;
}
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
color: #cccccc;
}
Personal common style
.modal-bg {
position: fixed;
top: 0;
bottom: 0;
right: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.8);
z-index: 100;
}
.show{
display: block!important;
}
.hide{
display: none!important;
}
@keyframes scale_an {
from {
transform: scale(1.05);
}
to {
transform: scale(1.1);
}
}
@keyframes translate_an {
from{
transform: translateX(-750px);
}
to{
transform: translateX(0);
}
}
@keyframes rotate_an {
from{
transform: rotate(0)
}
to{
transform: rotate(360deg)
}
}
Reference address: https://www.cnblogs.com/jiahuasir/p/11690216.html