以elementui为例
输入框样式
/* 更改输入框文本样式 */
:deep(.el-input input){
font-size: 18px;
color: red !important;
}
/* 更改输入框的placeholder文本样式 */
:deep(.el-input){
input::placeholder {
color: blue;
font-size: 18px;
}
}
/* 更改输入框禁用后的文本样式 */
:deep(.el-input.is-disabled .el-input__inner){
-webkit-text-fill-color:red!important;
}
滚动条
/* content为需要隐藏滚动的class */
.content::-webkit-scrollbar {
display:none
}
/* 修改滚动条样式 */
.content::-webkit-scrollbar {
width:5px;
background:red;
}
界面禁止点击
/* 修改滚动条样式 */
.content{
pointer-events: none;
cursor: not-allowed;
}
滤镜
/* 给页面整个加上灰度 */
body{
filter: grayscale(1);
}
文本渐变
.text{
width: 300px;
background-image: -webkit-gradient(linear, left 0, right 0, from(blue), to(orange));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
文本对齐
<div><span class='d1'>测试测试</span></div>
<div><span class='d1'>测试</span></div>
.d1{
display: inline-block;
width: 70px;
text-align-last: justify;
}