jquery - html div滚动条错误

标签 jquery css html google-chrome

如何将 z-index 位置应用于 html 滚动条。 enter image description here

问题是显示背景文本的滚动条。

该问题仅出现在 google chrome 浏览器中。

最佳答案

滚动条的父容器的不透明度 < 1.0,这意味着该容器的所有子容器最多具有该不透明度。

如何解决?

使用两个容器。

<div> <!-- Position this centrally, i.e what you have, but 1.0 opacity and no background -->
  <div></div> <!-- textarea/div with overflow & scrollbars here -->
  <div></div> <!-- content here with background color, opacity < 1.0 etc -->
</div>

关于jquery - html div滚动条错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10361117/

相关文章:

JQuery,将文本插入文本框

css - 通过 Chrome Devtools 将自定义样式表注入(inject)站点

javascript - 为什么我的 bas64 编码图像创建了一个 http 请求?

html - 输入不在 firefox/IE 中排列,但在 chrome/safari 中排列

css - 使 div 高度与其内容相同

html - 为什么有些元素的背景会延伸到 DIV 的宽度,而有些则不会?

jquery - 同步选项卡式导航

javascript - 将事件监听器附加到 jQuery 中动态生成的图像?

javascript - 滚动回到顶部动画不起作用

javascript - 在没有 ID 的情况下访问类中的按钮值