本文介绍了手机上的jQuery移动水平选择按钮太小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的手机上,我的选择按钮最终变得很小.我试图让它们占据水平空间的100%,以便每个人都占据水平空间的33%.

On my phone, my select buttons end up being very small. I'm trying to get them to take up, combined, 100% of the horizontal space, so that each one will take up 33% of the horizontal space.

在我的计算机上,它们占据了我想要的水平空间的100%.

On my computer, they take up 100% of horizontal space, like I want.

如何为我的手机修复此问题?

How do I fix this for my mobile?

html:

<div data-role="page" id="Gauntlet">
  <div data-role="header">
    <div data-role="navbar">
      <ul>
        <li><a href="#home" class="ui-btn-active ui-state-persist">Home</a></li>
      </ul>
    </div>
  </div>
  <div data-role="main" class="ui-content">
    <div data-role="collapsible-set">
      <div data-role="collapsible" data-collapsed="false" data-mini="true">
        <h3>Gauntlet Traits:</h3>
        <div class="ui-field-contain">
          <fieldset data-role="controlgroup" data-type="horizontal" class="custom-fieldset">
            <select id="myList1" data-mini="true"></select>
            <select id="myList2" data-mini="true"></select>
            <select id="myList3" data-mini="true"></select> 
          </fieldset>
        </div>
        <button type="button" id="submit" data-mini="true">Submit</button> 
      </div>
    </div>
    <div id="table_div"></div>
  </div>
  <div data-role="footer">
    <h2></h2>
  </div>
</div>

css:

.custom-fieldset .ui-controlgroup-controls {
    width: 100% !important;
}

.custom-fieldset .ui-controlgroup-controls .ui-select {
    width: 33.33% !important;
}

推荐答案

查看端口元标记文档

因此,添加元标记服务器端:

So, add the meta tag server side:

return HtmlService
        .createHtmlOutputFromFile('index')
        .addMetaTag('viewport', 'width=device-width, initial-scale=1');

这篇关于手机上的jQuery移动水平选择按钮太小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 13:02