多行省略
---copy
//单行
p{
width:300px; /*限制元素宽度*/
overflow: hidden; /*文本超出隐藏*/
text-overflow: ellipsis; /*文本超出显示省略号*/
white-space: nowrap; /*超出的空白区域不换行*/
}
// 3行
p{
width:300px; /*限制元素宽度*/
overflow: hidden; /*文本超出隐藏*/
display:-webkit-box; /*盒子模型微弹性伸缩模型*/
-webkit-box-orient: vertical;/*伸缩盒子的子元素垂直排列*/
-webkit-line-clamp: 3; /*文本显示3行*/
}
不可选中文本
---copy
.noselect {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
滚动条样式
---copy
.gun::-webkit-scrollbar {
width: 10px; /*高宽分别对应横竖滚动条的尺寸*/
height: 10px;
}
.gun::-webkit-scrollbar-thumb {
// border-radius: 10px;
background-color: #bbb;
// 条纹的滚动条
//background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
}
.gun::-webkit-scrollbar-track {
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #ededed;
border-radius: 10px;
}
---copy
.parent{
position: relative;
}
.parent .child{
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
}
按钮颜色 element ui
危险颜色
---copy
.ele_error{ color: #f56c6c; background: #fef0f0; border-color: #fbc4c4;}
.ele_error:hover{ background: #f56c6c; border-color: #f56c6c; color: #fff;}
.ele_error:active{ background: #dd6161; border-color: #dd6161; color: #fff;}
警告颜色
---copy
.ele_waring{ color: #e6a23c; background: #fdf6ec; border-color: #f5dab1;}
.ele_waring:hover{ background: #e6a23c; border-color: #e6a23c; color: #fff; }
.ele_waring:active{ background: #cf9236; border-color: #cf9236; color: #fff; }
成功颜色
---copy
.ele_success{ color: #67c23a; background: #f0f9eb; border-color: #c2e7b0; }
.ele_success:hover{ background: #67c23a; border-color: #67c23a; color: #fff; }
.ele_success:active{ background: #5daf34; border-color: #5daf34; color: #fff;}
信息颜色
---copy
.ele_primary{ color: #409eff; background: #ecf5ff; border-color: #b3d8ff; }
.ele_primary:hover{ background: #409eff; border-color: #409eff; color: #fff; }
.ele_primary:active{ background: #3a8ee6; border-color: #3a8ee6; color: #fff; }