gpt4 book ai didi

html - 如何更改 :focus 上文本区域的边框颜色

转载 作者:技术小花猫 更新时间:2023-10-29 11:28:56 26 4
gpt4 key购买 nike

我想在焦点上更改 TEXTAREA 的边框颜色。但我的代码似乎无法正常工作。

密码在fiddle .

<form name = "myform" method = "post" action="insert.php"  onsubmit="return validateform()" style="width:40%">
<input type="text" placeholder="Enter Name." name="name" maxlength="300" class="input">
<input type="email" placeholder="Enter E-mail." name="address" maxlength="300" class="input">
<textarea placeholder="Enter Message." name="descrip" class="input" ></textarea>
<br>
<input class="button secondary" type=submit name="submit" value="Submit" >
</form>

这是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;
}

关于html - 如何更改 :focus 上文本区域的边框颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16156594/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com