答案 0 :(得分:0)
当控件具有焦点时,可以使用CSS和:focus
选择器来设置样式。下面的CSS将在具有焦点的textarea控件周围添加一个2像素宽的边框。
textarea:focus {
border: 2px solid blue;
}
答案 1 :(得分:0)
根据需要按如下所示设置边框属性
textarea {
border: 1px solid #eee;
}
<textarea cols="50"></textarea>
答案 2 :(得分:0)
def view(request):
user = User.objects.all().select_related(
).prefetch_related(
'groups',
).get(pk=request.user.pk)
return render(request, 'app/template.html', {
'user': user,
})
.form-group.form-md-line-input .form-control.edited:not([readonly]) ~ label:after, .form-group.form-md-line-input .form-control.edited:not([readonly]) ~ .form-control-focus:after, .form-group.form-md-line-input .form-control:focus:not([readonly]) ~ label:after, .form-group.form-md-line-input .form-control:focus:not([readonly]) ~ .form-control-focus:after, .form-group.form-md-line-input .form-control.focus:not([readonly]) ~ label:after, .form-group.form-md-line-input .form-control.focus:not([readonly]) ~ .form-control-focus:after {
background: none !important;
}