lwwlgw/css/base.css

211 lines
3.8 KiB
CSS
Raw Permalink Normal View History

2022-03-30 10:18:47 +00:00
/* -moz-:firefox()
-ms-:ie
-webkit-:safarichrome
-o-:Opera
*/
/* 清空所有标签的内外边距 */
* {
padding: 0;
margin: 0;
/* css3盒子模型 */
box-sizing: border-box;
/* 取消轮廓 */
outline: none;
/* 去掉默认外观 */
-webkit-appearance: none;
/* 去掉点击时的默认外观 */
outline-style: none;
}
body {
/* 抗锯齿性-让文字显示的更加清晰 */
-webkit-font-smoothing: antialiased;
background-color: #FFFFFF;
font: 16px/1.5 Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\5B8B\4F53", sans-serif;
color: #262626;
}
/* em 和 i 斜体的文字不倾斜 */
em,
i {
font-style: normal;
}
/* 去掉li 的小圆点 */
ul,
ol,
li {
list-style: none;
}
button {
/* 当我们鼠标经过button按钮的时候鼠标变成小手 */
cursor: pointer;
}
img {
/* 照顾低版本浏览器 如果图片外面包含了链接会有边框的问题 */
border: 0;
/* 取消图片底侧有空白缝隙的问题 ① */
vertical-align: middle;
/* 取消图片底侧有空白缝隙的问题 ② */
display: block;
object-fit: cover;
}
/* 去掉a标签的下划线并修改字体颜色 */
a,
ins {
color: #262626;
text-decoration: none;
/* 手机端去除a标签点击时的背景样式 */
-webkit-tap-highlight-color: transparent;
}
/* 禁用长按时弹出的菜单 */
img,
a {
-webkit-touch-callout: none;
}
a {
cursor: pointer;
}
button,
input,
textarea {
font-family: Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\5B8B\4F53", sans-serif;
/* 取消轮廓 */
outline: none;
/* 去掉默认外观 */
-webkit-appearance: none;
/* 去掉点击时的默认外观 */
outline-style: none;
}
textarea {
/* 禁止自定义拉伸 */
resize: none;
}
/* 指定input默认样式 */
input::-webkit-input-placeholder,
input::-moz-placeholder,
input:-moz-placeholder,
input:-ms-input-placeholder,
textarea::-webkit-input-placeholder,
textarea::-moz-placeholder,
textarea:-moz-placeholder,
textarea:-ms-input-placeholder {
color:rgba(38,38,38,.5);
}
/* 清楚浮动 */
.clearfix:after {
visibility: hidden;
clear: both;
display: block;
content: ".";
height: 0
}
.clearfix {
*zoom: 1
}
/* 控制显示文字行数 */
.clips1 {
display: -webkit-box;
-webkit-line-clamp: 1;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
}
.clips2 {
display: -webkit-box;
-webkit-line-clamp: 2;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
}
.clips3 {
display: -webkit-box;
-webkit-line-clamp: 3;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
}
.clips4 {
display: -webkit-box;
-webkit-line-clamp: 4;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
}
.clips5 {
display: -webkit-box;
-webkit-line-clamp: 5;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
}
.clips6 {
display: -webkit-box;
-webkit-line-clamp: 6;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
}
.clips7 {
display: -webkit-box;
-webkit-line-clamp: 7;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
}
/* 页面宽度 */
.w100 {
width: 100%;
overflow: hidden;
}
.w1400 {
width: 1400px;
margin: auto;
2022-03-31 03:24:42 +00:00
overflow: hidden;
2022-03-30 10:18:47 +00:00
}
.w1280 {
width: 1280px;
margin: auto;
2022-03-31 03:24:42 +00:00
overflow: hidden;
2022-03-30 10:18:47 +00:00
}
/* 引入字体 */
@font-face {
font-family: "SourceHanSansSC-Medium";
src: url(../fonts/SourceHanSansSC-Medium.otf);
}
@font-face {
font-family: "sourcehansansSC-Bold";
src: url(../fonts/SOURCEHANSANSSC-BOLD.OTF);
}
@font-face {
font-family: "SourceHanSansSC-Heavy";
src: url(../fonts/SourceHanSansSC-Heavy.otf);
}