gpt4 book ai didi

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

转载 作者:太空狗 更新时间:2023-10-29 14:46:07 28 4
gpt4 key购买 nike

我的网站移动版表单中有一个 html5 日期选择器。我所有的文本输入都设置为 width: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%;
}

table#form 的宽度为 100%,.tbox 的宽度为 min-width:100%,我希望这可以解决您的问题。已更新 jsfiddle http://jsfiddle.net/brfQf/1/

关于iOS HTML5 日期选择器不接受宽度 : 100%;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16344650/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com