html - 输入字段在移动设备上表现怪异

标签 html css responsive

我有 2 个并排对齐的输入字段。它在桌面上运行良好,但在移动设备上它们表现得很奇怪。以下是我的代码和手机上的屏幕截图。任何人都可以帮忙吗?提前致谢。

你可以在这里看到它的实际效果:(页脚中的框是问题所在) https://www.wondercatspopup.com/hakkinda/

screenshot

<div style="display:flex;">
  <p class="form-row form-row-first">
    <label style="display:none!important;" for="billing_first_name"><?php _e('First name', 'woocommerce'); ?><span class="required">*</span></label>
    <input style="width: 130px;
        display: inline-block; margin-right:1px;" type="text" class="woocommerce-Input woocommerce-Input--text input-text placeholder" placeholder="İsim *" type="text" class="input-text" name="billing_first_name" id="billing_first_name" value="<?php if (!empty($_POST['billing_first_name'])) esc_attr_e($_POST['billing_first_name']); ?>"
    />


    <label style="display:none!important;" for="billing_last_name"><?php _e('Last name', 'woocommerce'); ?><span class="required">*</span></label>
    <input style="width: 130px;
        display: inline-block; margin-left:1px;" type="text" class="woocommerce-Input woocommerce-Input--text input-text placeholder" placeholder="Soyisim *" type="text" class="input-text" name="billing_last_name" id="billing_last_name" value="<?php if (!empty($_POST['billing_last_name'])) esc_attr_e($_POST['billing_last_name']); ?>"
    />
  </p>
</div>

<p style="margin-bottom: 0px; margin-top: 10px;" class="form-row form-row-wide">

  <label style="display:none!important;" for="reg_billing_phone"><?php _e( 'Phone', 'woocommerce' ); ?></label>
  <input style="width:274px!important;" type="text" class="woocommerce-Input woocommerce-Input--text input-text placeholder" placeholder="Cep Telefonu *" name="billing_phone" id="reg_billing_phone" value="<?php esc_attr_e( $_POST['billing_phone'] ); ?>"
  />
</p><br>

<div class="clear"></div>

最佳答案

问题出在第一个 div 的 display:flex 上。删除它,对齐问题应该得到解决。

关于html - 输入字段在移动设备上表现怪异,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46135995/

相关文章:

PHP HTML : File upload not working

javascript - 随机图像位置添加和删除循环

javascript - 无效字符错误: Failed to execute 'createElement' on 'Document' : The tag name provided ('/static/media/tab1.fab25bc3.png' ) is not a valid name

css - 我如何用 div 包装 Bootstrap 列?

javascript - 如何让用户在 HTML 中设置表格大小?

css - tabulator filter - 如何添加特定的 css 元素

javascript - CSS 将百分比转换为像素

css - 如何使 WP 侧边栏具有响应性并在小屏幕上显示在页面底部?

css - 如何设置全宽和响应式背景图片

javascript - 导航栏在不同的屏幕尺寸上无法正常工作