为什么data-position =“fixed”data-tap-toggle =“false”不起作用?
问题描述:
我想修复我的按钮,当我滚动我的内容。我用这个data-position="fixed"
data-tap-toggle="false"
。但它不起作用,按钮也向上滚动。 当我使用绝对位置时,它会到达底部。所以我使用相对位置。如果我将这些按钮添加到标题中,则背景蓝色显示在按钮上。 您可以请另外提供一种方式,以便在滚动内容时固定按钮。为什么data-position =“fixed”data-tap-toggle =“false”不起作用?
我点击它显示按钮和文本字段的按钮。然后滚动我的竞争按钮也滚动。 这是我的小提琴。 http://jsfiddle.net/ravi1989/E65Uy/
$(document).on('click', '#test', function() {
$("#searchbar").toggle("slow");
});
答
data-position="fixed" data-tap-toggle="false"
用于数据角色=不为别的div的“头”标记或元素
转寄此,http://jquerymobile.com/demos/1.2.0/docs/toolbars/bars-fixed.html
您应该使用CSS样式属性的位置,使其他元素固定
答
我已经改变了你的小提琴。
我改变了这一行:<div data-role="header" data-theme="b" data-position="fixed" data-tap-toggle="false" style='z-index:9999'>
编辑:
我已经改变了小提琴,这是你在找什么?
答
我解决它通过禁用CSS动画..
.slidedown, .reverse, .out {
-o-transition-property: none !important;
-moz-transition-property: none !important;
-ms-transition-property: none !important;
-webkit-transition-property: none !important;
transition-property: none !important;
-o-transform: none !important;
-moz-transform: none !important;
-ms-transform: none !important;
-webkit-transform: none !important;
transform: none !important;
-webkit-animation: none !important;
-moz-animation: none !important;
-o-animation: none !important;
-ms-animation: none !important;
animation: none !important;
}
你不希望蓝顶栏上的按钮? –
没有..你明白了吗 – Rohit
我需要按钮应该在文本上面.. – Rohit