javascript - 属性文本呈现不存在 : optimizelegibility

标签 javascript android jquery css

在网络浏览器中使用此代码:

.h1,.h2,.h3,.h4,.h5,.h6{margin:1.25em 0 0.2em;text-rendering:optimizeLegibility}

关于WC3验证获取错误

Property text-rendering doesn't exist : optimizelegibility

而且这个属性似乎对 android 有一些问题 here

该属性现在不存在了吗?

最佳答案

它从未存在过; text-rendering 是 SVG 的一部分,而不是 CSS。

The text-rendering property is an SVG property that is not defined in any CSS standard. However, Gecko and WebKit browsers let you apply this property to HTML and XML content on Windows, Mac OS X and Linux.

换句话说,text-rendering 对非 SVG 元素有影响是不标准的。根据 MDN 页面,它无论如何都没有得到广泛支持(Internet Explorer 和 Opera 不理解它)并且确实存在的实现存在已知问题。

最好完全避免它。

来源:Mozilla Developer Network .

关于javascript - 属性文本呈现不存在 : optimizelegibility,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34828097/

相关文章:

javascript - jquery focusout事件缺少相关目标信息

java - 如何在Android中使用GSON获取具有特定值的JSON对象

jquery - 如何使 Bootstrap 图像和 div 扩展到浏览器的宽度

javascript - 简单的背景颜色

javascript - 如何通过http从mongoDB发送大量文档?

javascript - 允许用户键入然后在浏览器中执行的 javascript 代码

javascript - 为什么我的 session 值针对特定值发生了变化?

RecyclerView 中的 Android RecyclerView?

android - 我怎样才能在 Android 中做到这一点。 Activity -> WebBrowser -> Activity,但按返回键看不到 WebBrowser

jQuery FullCalendar - 我可以以编程方式调整日历的大小吗