文本框的“框阴影”仅底部

艾德姆·乔杜里(Idham Choudry)

我对框阴影不是很熟悉,我想为我的网站创建一个仅包含底部框阴影的文本字段,代码如下所示:

input[type="text"], input[type="email"],  textarea{ box-shadow: 0 0 0 1.5px, 0 1px 0 rgba(0,0,0,0.08) inset}

这段代码为文本字段和文本区域生成完整的阴影框,我只希望底部获得阴影框,我已经看到了框阴影赃物解决方案,但我不知道该怎么做

弗朗特

尝试以下代码,为输入和文本区域创建底部阴影,并使用:focus代替:active

input[type="text"], input[type="email"],  textarea{ 
border:none;
box-shadow:1px 1px 10px 5px rgba(1,1,1,0.2);
transition: 0.6s ease;
}

input[type="text"]:focus, input[type="email"]:focus,  textarea:focus{ 
box-shadow:0px 10px 10px -8px rgba(1,1,1,0.8);
}

input[type="text"], input[type="email"],  textarea{ 
border:none;
box-shadow:1px 1px 10px 5px rgba(1,1,1,0.2);
transition: 0.6s ease;
margin-bottom:50px;
float:left;
width:100%;
height:20px;
}
textarea{
height:150px;
}
input[type="text"]:focus, input[type="email"]:focus,  textarea:focus{ 
box-shadow:0px 10px 10px -8px rgba(1,1,1,0.8);
}
<input type="text">
<input type="email">
<textarea></textarea>

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章