HTML5   发布时间:2022-04-27  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了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 HTML5日期选择器不接受宽度:100%;全部内容,希望文章能够帮你解决iOS HTML5日期选择器不接受宽度:100%;所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。