admin管理员组文章数量:1026989
I have qoestion About Input border.
I need to create a solid color inset border. I have an input And I want To put Border Inside It And when I hover On it border will Get smaller I Found A Solution here But It Can't Work Becuase I can't append span or div inside the input to put border on it
<input class="task-text" type="text" name="task" id="user-task">
this is the link of similar problem
<[1]: ;
Any Solution?
I have qoestion About Input border.
I need to create a solid color inset border. I have an input And I want To put Border Inside It And when I hover On it border will Get smaller I Found A Solution here But It Can't Work Becuase I can't append span or div inside the input to put border on it
<input class="task-text" type="text" name="task" id="user-task">
this is the link of similar problem
<[1]: https://stackoverflow./questions/8452739/css-inset-borders>
Any Solution?
Share Improve this question asked Jul 9, 2020 at 4:09 يوسف علي Yousef aliيوسف علي Yousef ali 11 silver badge1 bronze badge2 Answers
Reset to default 2Something like this?
.task-text {
padding: 5px;
outline: none;
border: none;
box-shadow: inset 0 0 0 5px red;
}
.task-text:hover {
box-shadow: inset 0 0 0 2px red;
}
<input class="task-text" type="text" name="task" id="user-task">
You can do this by using the css outline
and the css outline-outset
properties.
input {
padding: 10px;
outline: 1px solid black;
outline-offset: -10px;
}
<input type="text">
I have qoestion About Input border.
I need to create a solid color inset border. I have an input And I want To put Border Inside It And when I hover On it border will Get smaller I Found A Solution here But It Can't Work Becuase I can't append span or div inside the input to put border on it
<input class="task-text" type="text" name="task" id="user-task">
this is the link of similar problem
<[1]: ;
Any Solution?
I have qoestion About Input border.
I need to create a solid color inset border. I have an input And I want To put Border Inside It And when I hover On it border will Get smaller I Found A Solution here But It Can't Work Becuase I can't append span or div inside the input to put border on it
<input class="task-text" type="text" name="task" id="user-task">
this is the link of similar problem
<[1]: https://stackoverflow./questions/8452739/css-inset-borders>
Any Solution?
Share Improve this question asked Jul 9, 2020 at 4:09 يوسف علي Yousef aliيوسف علي Yousef ali 11 silver badge1 bronze badge2 Answers
Reset to default 2Something like this?
.task-text {
padding: 5px;
outline: none;
border: none;
box-shadow: inset 0 0 0 5px red;
}
.task-text:hover {
box-shadow: inset 0 0 0 2px red;
}
<input class="task-text" type="text" name="task" id="user-task">
You can do this by using the css outline
and the css outline-outset
properties.
input {
padding: 10px;
outline: 1px solid black;
outline-offset: -10px;
}
<input type="text">
本文标签: javascriptHow to do border inside the inputStack Overflow
版权声明:本文标题:javascript - How to do border inside the input? - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745656877a2161648.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论