【发布时间】:2021-05-25 00:32:42
【问题描述】:
所以我尝试使用 HTML 和 SASS 构建一个小型网站。我正在自定义一个表单输入框,如图form input box 所示,而它的出现与my error 非常相似。
HTML
<form action="input">
<input id="email" type="email" placeholder="Email Address" autocomplete="off">
<img id="error" src="/assets/images/icon-error.svg" alt="error.svg">
<button type="submit">
<img id="arrow" src="/assets/images/icon-arrow.svg" alt="">
</button>
</form>
SASS:
form {
display: flex;
align-content: center;
}
#email {
outline: none;
background: none;
border-color: $desaturatedRed;
border-style: solid;
border-width: thin;
border-radius: 50px;
width: 70%;
height: 50px;
padding-left: 5%;
&::placeholder {
color: $desaturatedRed;
font-family: 'Josefin Sans', sans-serif;
}
}
button {
width: 20%;
height: 50px;
outline: none;
background: $gradient2;
border-radius: 50px;
align-content: center;
border-style: none;
cursor: pointer;
margin-left: -8%;
visibility: hidden;
}
#error {
margin-left: -10%;
}
SASS 变量.SASS:
$desaturatedRed: hsl(0, 36%, 70%);
$softRed: hsl(0, 93%, 68%);
$darkGrayRed: hsl(0, 6%, 24%);
$gradient1: linear-gradient(135deg, hsl(0, 0%, 100%), hsl(0, 100%, 98%));
$gradient2: linear-gradient(135deg, hsl(0, 80%, 86%), hsl(0, 74%, 74%));
请帮帮我。
【问题讨论】:
-
请输入所有代码。它错过了去饱和。
-
我已经在问题中添加了变量。我认为它没有太大的联系。