iOS HTML5日期选择器不接受宽度:100%;

我的表单中有一个 html5日期选择器,用于我的网站的移动版本.我的所有文本输入都设置为宽度:100%,其父td设置为padding-right:15px以使其适合.这意味着我的字段格式很好,并且当设备的方向发生变化时,调整为总是填满容器的一半.但是,日期选择器的行为方式不一样,有人可以帮忙吗?

形成:

<form method="get" action="home">
<table id="form">
<tr><td>
<input type="text" name="Title" class="tbox" placeholder="Title" />
</td><td>
<input type="text" name="Genre" class="tbox" placeholder="Genre" />
</td></tr>
<tr><td>
<input type="text" name="Location" class="tbox" placeholder="Location" />
</td><td>
<input type="date" name="Date" class="tbox" placeholder="DD/MM/YY" />
</td></tr>
<tr><td>
<input type="text" name="postcode" class="tbox" id="postcode" placeholder="Postcode" />
</td><td>
<input type="number" name="radius" class="tbox" placeholder="Mile Radius" /><br />
</td></tr>
</table>
<input type="submit" value="Search" />
</form>

相关CSS:

.tbox {
background-color: #a1c9ff;
border: 1px solid #003f94;
width: 100%;
height: 30px;
margin: 3px 2px;
padding: 0 5px;
border-radius: 15px;
font-size: 18px;
float: left;
}

table#form tr td {
overflow: hidden;
padding-right: 15px;
}

解决方法

.tbox {  
    min-width:100%; 
}  
table#form {    
    width:100%;  
}

使用宽度100%表格形式和最小宽度:100%表示.tbox,我希望这可以解决你的问题.已经更新了jsfiddle http://jsfiddle.net/brfQf/1/

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...