所有页面的基础样式代码
主要方便页面统一 每次新项目便于直接使用
.container {
/* 统一页面背景色 */
width: 100vw;
height: 100%;
min-height: 100vh;
background-color: #f5f6f5;
/* 防止页面左右滑动 */
box-sizing: border-box;
overflow-x: hidden;
}
//副标题文字常用灰色
.subtitle {
color: #979A9A;
}
//文字超出边界隐藏加省略号
.txt {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
//网格布局 用于加载数量不确定的item
.grid_layout {
display: grid;
/* 表示两列 每列宽度为100rpx */
grid-template-columns: repeat(2, 100rpx);
/* 表示行间距为4vw 列间距为2vw */
grid-gap: 4vw 2vw;
}