ジャンプ先:

この記事はまだボランティアによって 日本語 に翻訳されていません。ぜひ MDN に参加して翻訳を手伝ってください!
この記事を English (US) で読むこともできます。

Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

Syntax

<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

Example

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;
  }
}

See also

ドキュメントのタグと貢献者

このページの貢献者: JeffersonScher, mdnwebdocs-bot, ExE-Boss, mfluehr
最終更新者: JeffersonScher,