我正在尝试在移动设备上为网站创建一个简单的联系表单。表格在桌面上工作正常但是当我在智能手机/移动设备上打开时,字段的长度正在增加。请看图片
我正在做的代码
@media only screen and (min-device-width : 360px) and (max-device-width : 640px) and (orientation : portrait)
{
.table tr td input[type="text"],
.table tr td input[type="email"]
{
width: 250px;
}
.table tr td input[type="text"]:focus,
.table tr td input[type="email"]:focus
{
border: 1px solid #f15b25;
}
}
@media only screen and (min-device-width : 360px) and (max-device-width : 640px) and (orientation : landscape)
{
.left_bottom table tr td input[type="text"],
.left_bottom table tr td input[type="email"]
{
width: 480px;
margin-left:1.5%;
}
.left_bottom table tr td input[type="text"]:focus,
.left_bottom table tr td input[type="email"]:focus
{
border: 1px solid #f15b25;
}
}
<form action="" method="post" enctype="multipart/form-data">
<table>
<tr>
<td><input type="text" placeholder="Name" name="senderName" class="wdlp_form" required /></td>
</tr>
<tr>
<td><input type="email" placeholder="Email" name="senderEmail" class="wdlp_form" required /></td>
</tr>
</table>