超出隐藏/换行
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: break-word;
word-break: break-all;
不显示滚动条样式
.screen_content {
display: flex;
align-items: center;
word-break: keep-all;
overflow: scroll;
scrollbar-width: none;
-ms-overflow-style: none;
}
.screen_content::-webkit-scrollbar {
display: none;
}
下划线相关样式
text-decoration: underline solid 3px;
text-decoration-color: #f9822c;
text-decoration: underline;
text-underline-position: under;
改变input框光标的颜色
input {
color: blue;
caret-color: red;
}
垂直三角形
.triangle {
width: 0;
height: 0;
border-top: 60px solid skyblue;
border-right: 60px solid transparent;
border-bottom: 60px solid transparent;
border-left: 60px solid skyblue;
}
排序三角
.top_three {
width: 0;
height: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #c9c9c9;
margin-bottom: 2px;
}
.bottom_three {
width: 0;
height: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 6px solid #c9c9c9;
}
原生table属性
table {
border-collapse: collapse;
}
tr:nth-child(even) {
background-color: #fff8f5;
}
tr:nth-child(odd) {
background-color: #fff8f5;
}
文字(两字、三字、四字)对齐方式
text-align-last: justify;
滚动条整体样式
::-webkit-scrollbar {
width: 12px;
height: 12px;
}
::-webkit-scrollbar-thumb {
background-color: darkgrey;
border-radius: 10px;
border: 2px solid transparent;
background-clip: content-box;
}
::-webkit-scrollbar-track {
background-color: #f1f1f1;
border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
background-color: grey;
}
vant 修改 van-field 默认的 placeholder 字体颜色
::v-deep .van-field__control::-webkit-input-placeholder {
color: #c8c9cc;
-webkit-text-fill-color: #c8c9cc !important;
}
:deep(.van-field__control::-webkit-input-placeholder) {
color: #c8c9cc;
font-size: 28px;
-webkit-text-fill-color: #c8c9cc !important;
}
vant 表单校验提示要求只显示一行红色:直接改变字体颜色
::v-deep .van-field__control::-webkit-input-placeholder {
color: #c8c9cc;
-webkit-text-fill-color: #c8c9cc !important;
}