::moz-selection 不适用于输入元素

发布于 2024-09-28 07:11:45 字数 107 浏览 2 评论 0原文

无论如何,我是否可以将 ::moz-selection 应用于输入元素,即使我必须编辑 userChrome.css、userContent.css 或其他类似文件中的某些文件?

谢谢

Is there anyway I can get ::moz-selection applied to input elements, even if I have to edit some file in userChrome.css, userContent.css or some similar file?

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

扭转时空 2024-10-05 07:11:45

输入的值不是 DOM 中的文本节点,因此 CSS 选择器将无法定位它。

The value of an input is not a text-node in the DOM, therefore CSS-selectors will not be able to target it.

执着的年纪 2024-10-05 07:11:45

根据这个问题: textarea::selection 和 ::-moz-selection 这是不可能的。也许它会出现在未来的浏览器中。

According to this question: textarea::selection and ::-moz-selection it's not possible. Maybe it will be in future browsers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文