css - textarea 元素的滚动条覆盖边框

标签 css angular twitter-bootstrap textarea scrollbar

当字符超过 4000 个时,我试图将边框颜色添加到 textarea,但是滚动条显示在 textarea 边框上。这种绿色边框颜色仅在单击文本区域时出现,但我在 CSS 中找不到任何 focus 属性。知道如何解决这个问题吗?

我尝试将顶部边框添加到滚动条,但没有成功。该元素正在使用 Bootstrap 。

enter image description here

最佳答案

你可以使用样式焦点

textarea:focus {
    outline: none !important;
    border:1px solid red;
    box-shadow: 0 0 10px #719ECE;
}

同时检查示例以更清楚https://stackblitz.com/edit/angular-textarea

关于css - textarea 元素的滚动条覆盖边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58338280/

相关文章:

angular - 从两个不同的 URL 验证 Keycloak token

css - 单击时如何设置 <select> 的外观样式?

javascript - 事件时如何自定义 Bootstrap 选项卡?

javascript - 如何在CSS中应用特定的滚动尺寸

javascript - -moz-user-focus 等效于 Chrome

html - 仅显示单击元素 Angular 2 的类

html - 使用 Bootstrap v4 验证 Nav-pills

css - Spring Boot - 不能包含静态资源

javascript - 在大多数移动浏览器上只有在出现重大延迟后图像才会更改

angular - ngIf 异步管道作为仅空检查的值