Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/190.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android jQuery移动元素大小_Android_Jquery Mobile_Webview - Fatal编程技术网

Android jQuery移动元素大小

Android jQuery移动元素大小,android,jquery-mobile,webview,Android,Jquery Mobile,Webview,这很简单,我在互联网上搜索过,但我找不到解决方案。我相信解决办法一定很简单,但无论如何,问题出在这里 我用jQueryMobile制作了一个移动网络(一个本地应用的webView),一切看起来都很庞大。我尝试使用style=“width:xx”设置按钮宽度,但高度如何?总体尺寸 比如,页眉占据了我页面的四分之一 谢谢现场示例: (宽度) (高度) JS: 更新:(我想这就是你要找的) HTML: 相关的: 谢谢。我在原来的帖子里看到了这个答案。我想会有一个更简单的方法。但是谢谢,这

这很简单,我在互联网上搜索过,但我找不到解决方案。我相信解决办法一定很简单,但无论如何,问题出在这里

我用jQueryMobile制作了一个移动网络(一个本地应用的webView),一切看起来都很庞大。我尝试使用style=“width:xx”设置按钮宽度,但高度如何?总体尺寸

比如,页眉占据了我页面的四分之一

谢谢

现场示例:

  • (宽度)
  • (高度)
JS:

更新:(我想这就是你要找的)

HTML:



相关的:


谢谢。我在原来的帖子里看到了这个答案。我想会有一个更简单的方法。但是谢谢,这很有帮助。jQM添加了很多额外的HTML,使其在多个设备上都具有外观和感觉,因此最好使用Chrome开发工具或Firebug之类的工具查看添加的HTML元素,找到以这种方式操作所需的元素。
// For all buttons use something like this
$('.ui-btn').css('width','50%');

// For individual buttons use something like this
$('#theButton1').parent().css('width', '75%');

// Or this for HREF data-role buttons
$('#hrefButton4').css('width', '45%');
// this changes the height for all buttons
$('.ui-btn-text').css('font-size','50px');

// This changes the height for a single element 
$('#hrefButton3').children().children().css('font-size','30px');
<div data-role="page" id="home"> 
    <div data-role="content">
        <input type="button" id="theButton1" value="Press Me 1" />
        <input type="button" id="theButton2" value="Press Me 2" />
        <input type="button" id="theButton3" value="Press Me 3" />
        <input type="button" id="theButton4" value="Press Me 4" />
        <br />
        <a href="#" data-role="button" id="hrefButton1">HREF Me 1</a>
        <a href="#" data-role="button" id="hrefButton2">HREF Me 2</a>
        <a href="#" data-role="button" id="hrefButton3">HREF Me 3</a>
        <a href="#" data-role="button" id="hrefButton4">HREF Me 4</a>
    </div>
</div>