内联样式对屏幕阅读器有害吗?

发布于 2024-08-27 22:21:49 字数 335 浏览 7 评论 0原文

示例

<span style="BACKGROUND-COLOR: #ffd700">Background color</span>

屏幕阅读器如何处理内联 css?除了CSS管理之外,内联CSS还有其他缺点吗?

内联样式也有效。我使用 W3C Validator 和 XHTML 1.0 Strict doctype 进行了测试?

<p><span style="MARGIN-RIGHT: 0px">Left indent</span></p>

Example

<span style="BACKGROUND-COLOR: #ffd700">Background color</span>

How screen reader handle inline css ? is there any other cons of inline CSS except css management?

Inline styles are valid also . i tested with W3C Validator and with XHTML 1.0 Strict doctype?

<p><span style="MARGIN-RIGHT: 0px">Left indent</span></p>

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

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

发布评论

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

评论(2

烂人 2024-09-03 22:21:50

屏幕阅读器如何处理内联 CSS?

与任何其他 CSS 相同。

除了CSS管理之外,内联CSS还有其他缺点吗?

只是与带宽相关的成本。

How screen reader handle inline css ?

Same as any other CSS.

is there any other cons of inline CSS except css management?

Just bandwidth related costs.

空袭的梦i 2024-09-03 22:21:50

内联样式很难管理和覆盖。如果您设置颜色和边框,它们可能会覆盖您的打印样式表。我在打印预览中看到了黄色链接……显然不是作者的意图,而是非常糟糕的用户体验。

屏幕阅读器仅支持 display 属性,不使用 display:none 的说话元素。在哪里声明并不重要。

Inline styles are hard to manage and to override. And if you set colors and borders they may override your print stylesheet. I have seen yellow links in print previews …  clearly not the author’s intention but a very bad user experience.

Screenreaders honor only the display property, the don’t speak elements with display:none. It doesn’t matter where you declare it.

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