问题描述
您好,我正在使用jquery mobile创建一个移动应用,正在使用可以从右向左滑动的面板,但是我想进一步向前移动,而不是从右向左滑动,我希望它从上向下滑动
Hello i am creating a mobile app with jquery mobile, am working the panel that can slide from right to left, but i want to move a step further, instead of it sliding from right to left,i want it to slide from top down
我该怎么办
这是我所做的
<div data-role="panel" id="menu" data-position="right" data-display="overlay" style="background-color: rgba(0,0,0,0.7);">
关闭面板
Close panel
目前,它是从右向左滑动的,所以我想对其进行更改,以便它可以从顶部滑动.
this presently slides from the right to left, so i want to change it so it can slide from the top
推荐答案
创建jQuery Mobile Panel的目的是从左或向右滑动,而不是从顶部/底部滑动.有关position
的信息,请参见此处: http://api.jquerymobile.com/panel/#option-position
The jQuery Mobile Panel is created to slide from left or right, not from top / bottom.See doc here about the position
: http://api.jquerymobile.com/panel/#option-position
positionType: String
Default: "left"
The side of the screen the panel appears on. Values can be "left" or "right".
实现顶部或底部的幻灯片可能非常复杂/漫长,因为您将不得不依靠jQuery移动源来查看面板的处理方式.
It may be quite complicated/long to implement the top or bottom slide, as you will have to look to jQuery mobile source to see how the panel is handled.
您可以找到一些关注此问题的人,例如:
You can find some people that looked at this question, for example:
- How do I use Jquery Mobile Slide Panel to slide up from the bottom?
- How to swipe top down JQuery mobile
请注意以下事实:如果这些解决方案过旧,则可能与您的版本不兼容
Be careful with the fact that those solutions may not be compatible with your version if they are too old
这篇关于jQuery移动面板从顶部而不是从左右滑动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!