简体   繁体   English

如何使我的引导表单响应?

[英]How do I make my bootstrap form responsive?

I couldn't seem to get my form responsive.我似乎无法让我的表单响应。 It works fine with desktop view.它适用于桌面视图。

I'm a beginner and I am absolutely clueless... Need help with this, would appreciate the kind gesture.我是初学者,我绝对一无所知...需要帮助,将不胜感激。

Here's the code snippet:这是代码片段:

<div class="container">
  <div class="row mt-1">
    <div class="col-lg-6 col-md-6 col-xs-12">
      <form action="https://formspree.io/mvowablq" method="POST">
        <div class="form-group">
          <label for="name">Name:</label>
          <input
            type="name"
            class="form-control"
            id="name"
            placeholder="Enter name"
            name="name"
          />
        </div>

        <div class="form-group">
          <label for="email">Email:</label>
          <input
            type="email"
            class="form-control"
            id="email"
            placeholder="Enter email"
            name="_replyto"
          />
        </div>

        <div class="form-group">
          <label for="message">Message:</label>
          <textarea
            class="form-control"
            name="message"
            id="message"
            cols="30"
            rows="10"
          ></textarea>
        </div>

        <button type="submit" class="btn btn-default">Send</button>

      </form>
    </div>
    <div class="col-lg-6 col-md-6">
      <img
        class="img-fluid"
        src="/Selected - Contact/7DFB6BE4-B9D8-470A-8A4F-AF11EFA7F565.png"
        alt=""
      />
    </div>
  </div>
</div>

Bootstrap is already responsive if installed correctly.如果安装正确,Bootstrap 已经响应。 Do you have <meta name="viewport" content="width=device-width, initial-scale=1.0"> in your header?您的 header 中有<meta name="viewport" content="width=device-width, initial-scale=1.0">吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM