小编use*_*ser的帖子

如何解决jQuery mobile中页面之间的缓慢转换?

在我的Phonegap应用程序中,我有2个页面(主页面,表单页面)当我从主页面导航到表单页面时,显示表单页面花了太多时间,我没有添加任何java脚本代码,这是我的jsfiddle包含我的表单页面代码[JSFiddle] [1].我的表单页面是否有任何错误导致转换速度变慢?我怎样才能加快过渡?请帮助我,因为我是jQuery mobile的新手.

提前致谢.

主页

 <html>
  <head>  
  <meta charset="utf-8" /> 
  <meta name="format-detection" content="telephone=no" />  
  <meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0,          minimum-scale=1, width=device-width,height=device-height, target-densitydpi=device-dpi" />
   <link rel="stylesheet" type="text/css" href="css/index.css" />

   <script src="js/jquery-1.8.2.min.js"></script>      
   <link href="css/jquery.mobile-1.3.2.min.css"     rel="stylesheet" type="text/css" />
   <script src="js/jquery.mobile-1.3.2.min.js"  type="text/javascript"></script>
    <script type="text/javascript" src="phonegap.js"></script>
   </head>
   <body>
    <div data-role="page"    id="Main" >
    <div data-role="header"  data-theme="b" > </div>
    <div data-role="content">
    <a href="Form.html" data-transition="none" data-role="button" data-theme="none"                       data-corners="false"><img src="images/profile.png"   /></a><BR><BR><BR>
    <font color="white"  size="6px"  >  Profile </font>
    </div>

     </div>
   </body>
  </html>
Run Code Online (Sandbox Code Playgroud)

jquery-mobile cordova

3
推荐指数
1
解决办法
2029
查看次数

在jQuery mobile 1.4.0中更改单选按钮的样式

我在我的jQuery移动应用程序中有以下单选按钮,我需要将它们设置为下图中的单选按钮.我试过以下css但它没有给我相同的结果,请帮帮我..

在此输入图像描述

HTML

<div data-role="page">
<div data-role="header"  data-theme="b" style="height:63px;">
</div>
<div data-role="content">
    <form>
   <fieldset>
   <input type="radio"    id="Male"    value=" Male" name="radio-group-1" />
   <label  for="Male"  data-inline="true"  style="background:transparent                 !important;">Male </label>

   <input type="radio"    id="Female"    value=" Female" name="radio-group-1" />
   <label  for="Female"  data-inline="true" style="background:transparent !important;"   >Female </label>
    </fieldset> 
    </form>


 </div>
 </div>
Run Code Online (Sandbox Code Playgroud)

CSS

input[type="radio"] {
display: none;
}


.ui-btn.ui-radio-off:after, .ui-btn.ui-radio-on:after{
   width: 25px;
   height: 25px;
 }

.ui-btn.ui-radio-off:after, .ui-btn.ui-radio-on:after{
   margin-top: -18px;
   margin-left: -38px; 
}
.ui-btn.ui-radio-on:after{
   width: 55px;
   height: 55px;
   background: green !important;
   background-size:100px 24px;
}
Run Code Online (Sandbox Code Playgroud)

这就是我得到的 在此输入图像描述

css jquery-mobile jquery-mobile-radio

2
推荐指数
1
解决办法
4287
查看次数

将自定义动画添加到jQuery mobile中的可折叠集

我在jQuery mobile 1.4.0中有一个可折叠的设置我想为这个可折叠的设置添加一个自定义动画,当它像动画这样扩展时

我在JSFiddle的可折叠集

我使用了以下样式来为可折叠设置动画,但它没有给我相同的结果.如何将此幻灯片向下/向上动画应用到我的可扩展时?

请帮我 ..

.ui-collapsible-content {
  -webkit-transition: all 1s;
  -moz-transition: all 1s;
  -ms-transition: all 1s;
  -o-transition: all 1s;
  transition: all 1s;
  height: 2em;
  overflow: hidden;
 }

.ui-collapsible-content-collapsed {
  display: block;
  height: 0;
  padding: 0 16px;
}
Run Code Online (Sandbox Code Playgroud)

jquery-mobile jquery-mobile-collapsible

1
推荐指数
1
解决办法
1633
查看次数

如何在android中将浮点数四舍五入到一位数字?

我想编写一种方法将用户的BMI(浮点数)四舍五入到一位数字,逻辑是否正确以及如何在android Java中编写它?

private static final DecimalFormat oneDigit = new DecimalFormat("#,##0.0");
      public static float roundToOneDigit(float paramFloat)
  {  
         float   f = Float.valueOf(oneDigit.format(paramFloat)).floatValue();

          f=f;
         return f;

  }
Run Code Online (Sandbox Code Playgroud)

java android

0
推荐指数
1
解决办法
5897
查看次数