非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。

As of Firefox 73, this feature is no longer supported. Use pointer: coarse 代替。

句法

<integer>
If the device supports touch events (for a touch screen), this is 1. Otherwise it's 0.

Media: media/visual
Accepts min/max prefixes: no

范例

You might use this feature to render your buttons slightly larger if the user is on a touch-screen device, to make them more finger-friendly.

button {
  padding: .5em;
}
@media (-moz-touch-enabled) {
  button {
    padding: 1em;
  }
}
					

另请参阅

元数据

  • 最后修改:
  1. CSS
  2. CSS 参考