登录页面输入框背景样式问题修复
来源:3-8 美化登录页面样式
十丈红尘
2025-02-13
- 参考《导入element-plus报错及el-input无法输入问题》解决后,问题地址:https://coding.imooc.com/learn/questiondetail/pylDv6yEvJ56kBNm.html
- 导入element-plus报错及el-input无法输入问题解决后登录页面输入框背景样式与课程不符的问题修复直接在css中加入以下代码即可
::v-deep .el-input__wrapper {
background: transparent !important; /* 设置为透明,去掉默认背景 */
box-shadow: none;
}
- 完整的CSS请直接复制一下css文件
<style lang="scss" scoped>
$bg: #2d3a4b;
$dark_gray: #889aa4;
$light_gray: #eee;
$cursor: #fff;
.login-container {
min-height: 100%;
width: 100%;
background-color: $bg;
overflow: hidden;
.login-form {
position: relative;
width: 520px;
max-width: 100%;
padding: 160px 35px 0;
margin: 0 auto;
overflow: hidden;
::v-deep .el-form-item {
border: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(0, 0, 0, 0.1);
border-radius: 5px;
color: #454545;
}
::v-deep .el-input {
display: inline-block;
height: 47px;
width: 85%;
input {
background: transparent;
border: 0px;
-webkit-appearance: none;
border-radius: 0px;
padding: 12px 5px 12px 15px;
color: $light_gray;
height: 47px;
caret-color: $cursor;
}
}
::v-deep .el-input__wrapper {
background: transparent !important; /* 设置为透明,去掉默认背景 */
box-shadow: none;
}
}
.svg-container {
padding: 6px 5px 6px 15px;
color: $dark_gray;
vertical-align: middle;
display: inline-block;
}
.title-container {
position: relative;
.title {
font-size: 26px;
color: $light_gray;
margin: 0px auto 40px auto;
text-align: center;
font-weight: bold;
}
}
.show-pwd {
position: absolute;
right: 10px;
top: 7px;
font-size: 16px;
color: $dark_gray;
cursor: pointer;
user-select: none;
}
}
</style>
写回答
1回答
-
十丈红尘
提问者
2025-02-13
这一章集成element-plus确实问题比较多,对应的问题我都给大家整理好了直接参考这几个回答即可:
导入 element-plus 之后直接报错:https://coding.imooc.com/learn/questiondetail/y82QvPAKRzKXd5Nn.html
关于element-plus/icons报错问题的终极解决方案:https://coding.imooc.com/learn/questiondetail/GgzqwXjREVGXDxW0.html
导入element-plus报错及el-input无法输入问题:https://coding.imooc.com/learn/questiondetail/pylDv6yEvJ56kBNm.html
登录页面输入框背景样式问题修复:https://coding.imooc.com/learn/questiondetail/jlqGxYzRDG3Ye1Dk.html
00
相似问题