hash - JqueryMobile 使用 css3 目标设备

标签 hash css jquery-mobile target

我尝试在带有 jQ​​ueryMobile 的 Web 应用程序中使用 :target css3,但在 href 发送事件中使用哈希。

我尝试将 false 放在哈希事件上,但它不起作用。

你有什么方法或想法吗?

谢谢!

我去过这种类型的菜单:

<nav>
<ul>
<li><a href="#home"><img alt="Home" src="home.png"></a>
<li><a href="#apps"><img alt="Apps" src="apps.png"></a>
<li><a href="#pics"><img alt="Pics" src="pics.png"></a>
<li><a href="#chat"><img alt="Chat" src="chat.png"></a>
</ul>
</nav>

和这种部分:

<section id="home">
<h1>Welcome :)</h1>
<p>
without highly efficient portals. Distinctively recaptiualize bricks and
clicks laboration and idea sharing through holistic business models.
</p>
</section>
[...]

这个元素在一个页面上,我尝试使用这个 css3 :target

#home:target {
margin-top:-1200px;
}

但是 jQueryMobile 试图找到页面#home

我的手机 init 有:

$(document).bind("mobileinit", function(){
$.mobile.defaultPageTransition = 'flip';
$.mobile.ajaxEnabled = true;
$.mobile.hashListeningEnabled = false;
});

包在这里:http://www.oxynel.com/jqm-css3-target.zip

抱歉,我有图片,我只是在 jsfiddle 上发现示例!

最佳

法比安

最佳答案

在你的链接上尝试:

data-role="none"JQM 应该单独保留链接。

关于hash - JqueryMobile 使用 css3 目标设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7848540/

相关文章:

ruby-on-rails - 如何将 ruby​​ 散列数组转换为单个散列?

jQuery 砌体问题

javascript - 使用 "this"选择器的 JQuery Mobile 菜单不起作用

html - 如何在文本下方稍微对齐图像

javascript - JQuery手机滑动切换页面

javascript - jQuery Mobile 中的空控制组

ruby - 哈希到数组转换

c# - 使用Base64编码的公钥验证RSA签名

algorithm - 查找集合中下一个最小和最大数字的快速算法

javascript - 使用 flex/css 和 javascript 构建响应式 slider