【问题标题】:Why check-button doesn't show correctly on mobile?为什么检查按钮在移动设备上无法正确显示?
【发布时间】:2021-01-06 16:30:30
【问题描述】:

我在桌面上得到了这个小登录页面:

desk

在手机上:

enter image description here

html:

<section class="flex-container">

  <div class="imagex">
    <img src="./src/rat2.svg" class='rat' alt="" srcset="">
  </div>

  <div class="form-container">
      <input class="form-control form-i" type="text" placeholder="ID">
      <input class="form-control form-i" type="password" placeholder="PASSWORD">
  
      <div class="form-f">
          <input class="form-i check" type="checkbox"">
          <p>REMEMBER ME</p>
      </div>

      <button class="btn btn-primary form-i btnF" type="submit">SIGN</button>
  </div>
</session> 

为什么工作方式不同?

【问题讨论】:

标签: html css checkbox


【解决方案1】:

这一点:

  <div class="form-f">
  <input class="form-i check" type="checkbox"">
  <p>REMEMBER ME</p>
</div>

你可以这样尝试:

  <div class="form-control form-f">
  <label><input class="form-control form-i check" type="checkbox"> REMEMBER ME</label>
</div>

至少我相信您在至少检查input 的类声明中缺少form-control

【讨论】:

    猜你喜欢
    • 2021-02-02
    • 1970-01-01
    • 1970-01-01
    • 2023-03-03
    • 2018-11-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-03
    相关资源
    最近更新 更多