我为表单字段添加了发光效果
def index
@channels = Channel.all.order("created_at ASC")
@applies = Apply.all.order("created_at ASC")
end
HTML
textarea:focus, input:focus, .uneditable-input:focus {
box-shadow: 0 1px 1px rgba(82, 174, 255, 0.075) inset, 0 0 8px rgba(82, 174, 255, 0.6) !important;
outline: 0 none !important;
}
.has-error {
box-shadow: 0 1px 1px rgba(218, 21,17, 0.075) inset, 0 0 8px rgba(218, 21,17, 0.6) !important;
}

如果必填字段为空,我想将发光添加到.has-error类,因此添加了box-shadow。但是,如附图所示,阴影比原始输入字段大。