<tfoot id='OASor'></tfoot>
    <legend id='OASor'><style id='OASor'><dir id='OASor'><q id='OASor'></q></dir></style></legend>
      <bdo id='OASor'></bdo><ul id='OASor'></ul>
    <i id='OASor'><tr id='OASor'><dt id='OASor'><q id='OASor'><span id='OASor'><b id='OASor'><form id='OASor'><ins id='OASor'></ins><ul id='OASor'></ul><sub id='OASor'></sub></form><legend id='OASor'></legend><bdo id='OASor'><pre id='OASor'><center id='OASor'></center></pre></bdo></b><th id='OASor'></th></span></q></dt></tr></i><div id='OASor'><tfoot id='OASor'></tfoot><dl id='OASor'><fieldset id='OASor'></fieldset></dl></div>
    1. <small id='OASor'></small><noframes id='OASor'>

        css hover 可以在移动设备上使用吗?

        时间:2023-11-01
        <tfoot id='kfM0B'></tfoot>
          <tbody id='kfM0B'></tbody>

          • <bdo id='kfM0B'></bdo><ul id='kfM0B'></ul>

            • <legend id='kfM0B'><style id='kfM0B'><dir id='kfM0B'><q id='kfM0B'></q></dir></style></legend>

                <i id='kfM0B'><tr id='kfM0B'><dt id='kfM0B'><q id='kfM0B'><span id='kfM0B'><b id='kfM0B'><form id='kfM0B'><ins id='kfM0B'></ins><ul id='kfM0B'></ul><sub id='kfM0B'></sub></form><legend id='kfM0B'></legend><bdo id='kfM0B'><pre id='kfM0B'><center id='kfM0B'></center></pre></bdo></b><th id='kfM0B'></th></span></q></dt></tr></i><div id='kfM0B'><tfoot id='kfM0B'></tfoot><dl id='kfM0B'><fieldset id='kfM0B'></fieldset></dl></div>

                <small id='kfM0B'></small><noframes id='kfM0B'>

                1. 本文介绍了css hover 可以在移动设备上使用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  css hover 是否可以在移动设备上使用?我有一个 CSS 悬停类,它在常规网络浏览器上运行良好,但在移动浏览器上不起作用.

                  Does css hover work on mobile devices? I have a css hover class which works fine on a regular web browser, but doesn't work on mobile browsers.

                  推荐答案

                  :hover 伪类需要一个指针(图形输入)设备,能够区分动作 pointing选择/激活. 通常在带有触摸界面的移动设备上,您没有前者,只有后者.还有一些笔界面只允许激活,不能指点.

                  The :hover pseudo-class needs a pointing (graphical input) device, capable of distinguishing the actions pointing and selecting/activating. Usually on mobile devices with a touch interface you don't have the former, only the latter. Also some pen interfaces only allow activating, not pointing.

                  :hover 伪类在用户指定一个元素(使用一些指针设备)但不激活它时应用.例如,当光标(鼠标指针)悬停在元素生成的框上时,可视用户代理可以应用此伪类.不支持交互式媒体的用户代理不必支持这个伪类.一些支持交互式媒体的符合标准的用户代理可能无法支持此伪类(例如笔设备).

                  The :hover pseudo-class applies while the user designates an element (with some pointing device), but does not activate it. For example, a visual user agent could apply this pseudo-class when the cursor (mouse pointer) hovers over a box generated by the element. User agents not supporting interactive media do not have to support this pseudo-class. Some conforming user agents supporting interactive media may not be able to support this pseudo-class (e.g., a pen device).

                  —W3C:CSS 2.1:选择器,动态伪类

                  所以,回答您的问题:这取决于设备,但可能不会.不要依赖它.随着触摸屏设备的迅速普及,您将失去所有仅指点的事件.

                  So, to answer your question: It depends on the device but likely no. And don't rely on it. With touch-screen devices quickly gaining in popularity you'll lose the entirety of pointing-only events.

                  这篇关于css hover 可以在移动设备上使用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在 CSS 中延迟 :hover 效果? 下一篇:在移动浏览器上禁用悬停效果

                  相关文章

                  <tfoot id='Dyn75'></tfoot>

                2. <small id='Dyn75'></small><noframes id='Dyn75'>

                3. <legend id='Dyn75'><style id='Dyn75'><dir id='Dyn75'><q id='Dyn75'></q></dir></style></legend>

                  • <bdo id='Dyn75'></bdo><ul id='Dyn75'></ul>
                4. <i id='Dyn75'><tr id='Dyn75'><dt id='Dyn75'><q id='Dyn75'><span id='Dyn75'><b id='Dyn75'><form id='Dyn75'><ins id='Dyn75'></ins><ul id='Dyn75'></ul><sub id='Dyn75'></sub></form><legend id='Dyn75'></legend><bdo id='Dyn75'><pre id='Dyn75'><center id='Dyn75'></center></pre></bdo></b><th id='Dyn75'></th></span></q></dt></tr></i><div id='Dyn75'><tfoot id='Dyn75'></tfoot><dl id='Dyn75'><fieldset id='Dyn75'></fieldset></dl></div>