我环顾四周但却找不到我想要的东西.
我目前在我的页面上有一个css动画,由以下内容触发:hover.当页面调整为使用媒体查询超过宽度700px时,我希望将其更改为"单击"或"触摸".
这就是我现在所拥有的:http://jsfiddle.net/danieljoseph/3p6Kz/
正如您所看到的,:hover将无法在移动设备上运行,但我仍然希望确保它只是通过单击而不是悬停来以相同的方式工作.
如果可能的话我宁愿使用css但也对JQuery感到满意.
我有一种感觉,这很容易做到,但我只是遗漏了一些非常明显的东西!任何帮助,将不胜感激.
这是css动画:
.info-slide {
position:absolute;
bottom:0;
float:left;
width:100%;
background:url(../images/blue-back.png);
height:60px;
cursor:pointer;
overflow:hidden;
text-align:center;
transition: height .4s ease-in-out;
-webkit-transition: height .4s ease-in-out;
-moz-transition: height .4s ease-in-out;
}
.info-slide:hover {
height:300px;
}
Run Code Online (Sandbox Code Playgroud)