Forgive me is this is a stupid question, but i need help.
I want to change border color of TEXTAREA on focus. but my code doesn't seem to working properly.
Kindly view code on fiddle.
Here is the CSS
.input {
border:0;
padding:10px;
font-size:1.3em;
font-family:"Ubuntu Light","Ubuntu","Ubuntu Mono","Segoe Print","Segoe UI";
color:#ccc;
border:solid 1px #ccc;
margin:0 0 20px;
width:300px;
-moz-box-shadow: inset 0 0 4px rgba(0,0,0,0.2);
-webkit-box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2);
box-shadow: inner 0 0 4px rgba(0, 0, 0, 0.2);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
input:focus {
outline: none !important;
border-color: #719ECE;
box-shadow: 0 0 10px #719ECE;
}
解决方案.input:focus {
outline: none !important;
border:1px solid red;
box-shadow: 0 0 10px #719ECE;
}
本文探讨如何使用CSS为textarea元素设置焦点时的边框颜色,提供了一份不生效的代码示例,并给出了修复后的解决方案。通过阅读,读者将学会如何正确实现输入框聚焦时的视觉反馈。

4365

被折叠的 条评论
为什么被折叠?



