我正在尝试使用CSS设置文本框的边框,但是我无法做到。这是我的代码:
但是当我在内联CSS中指定无边框,然后尝试在:hover伪类中设置边框时,它就可以工作。像这样:
<input type="email" id="email" style="display:inline-block;margin-top:10px;width:180px;height:30px;border:1px solid #cccccc;border-radius:1px;padding-left:8;padding-right:8;">
<style>
#email:hover
{
box-shadow: inset 0 0 4px rgba(192,192,192,0.4);
border:1px solid #bbbbbb;
}
</style>
但是当我在内联CSS中指定无边框,然后尝试在:hover伪类中设置边框时,它就可以工作。像这样:
<input type="email" id="email" style="display:inline-block;margintop:10px;width:180px;height:30px;border-radius:1px;padding-left:8;padding-right:8;">
<style>
#email:hover
{
box-shadow: inset 0 0 4px rgba(192,192,192,0.4);
border:1px solid #bbbbbb;
}
</style>