强迫水平的scroolbar

时间:2016-10-06 16:52:17

标签: html css twitter-bootstrap

我有一个问题,我无法找到解决方案.. 在移动设备上,强制水平滚动显示..

http://andreibilecatestwebsites.comxa.com/Tentrom%20-%20homepage/index2.html这是我正在测试它的网站..

在我尝试找到解决方案之后,我注意到:只有当我从第120行一直到第164行擦除所有HTML代码时,问题才会消失。这意味着整个部分。

我尝试将代码留在那里并删除与此相关的整个样式表和响应式样式,但问题仍然存在。

所以我非常确定我使用HTML代码做了些什么。 谢谢你的帮助

   <div class="container">
  <div class="row">
    <div class="row">
       <div class="backgroundimage">
          <div class="row">
    <div class="col-sm-12 hidden-md hidden-lg">
      <a href="#contactform"><button type="submit" class="btn btn-primary buton center-block buttonform">CONTACTEAZA-NE </button></a>
    </div>
  </div>
  <div class="row">
    <div class="col-xs-offset-2 col-xs-8 col-xs-offset-2 col-md-offset-8 col-md-3 col-md-offset-1 col-sm-offset-4 col-sm-6 col-sm-offset-2 formular">
      <h3>CONTACTEAZA-NE</h3>
      <p>Lasa-ne mesajul tau pentru a fi contactat ulterior:</p>
                     <!-- TRATORIA FORM STARTS HERE -->
        <form class="form" id="contactform" action="contact.php" method="post">
        <div class="col-xs-12">
        <div class="form-group">
        <input type="text" class="form-control" name="firstname" placeholder="Prenumele tau:">
        </div>
        <div class="form-group">
        <input type="text" class="form-control" name="lastname" placeholder="Nmele tau:">
        </div>
        <div class="form-group">
        <input type="email" class="form-control" name="email" aria-describedby="emailHelp" placeholder="Adresa ta de email:">
        </div>
        <div class="form-group">
        <input type="tel" class="form-control" name="phonenumber" placeholder="Numarul tau de telefon:">
        </div>
        <div class="form-group">
        <textarea class="form-control" name="message" rows="3" placeholder="Mesajul tau:"></textarea>
        </div>
      </div>
        <button type="submit" class="btn btn-primary buton center-block">Trimite </button>
        </form>
        </div>
  </div>
  </div>
</div>

   

1 个答案:

答案 0 :(得分:1)

您在共享代码中遗漏了</div>,请检查并更新。

<div class="container">
    <div class="row">
        <div class="row">
            <div class="backgroundimage">
                <div class="row">
                    <div class="col-sm-12 hidden-md hidden-lg">
                        <a href="#contactform"><button type="submit" class="btn btn-primary buton center-block buttonform">CONTACTEAZA-NE </button></a>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-offset-2 col-xs-8 col-xs-offset-2 col-md-offset-8 col-md-3 col-md-offset-1 col-sm-offset-4 col-sm-6 col-sm-offset-2 formular">
                        <h3>CONTACTEAZA-NE</h3>
                        <p>Lasa-ne mesajul tau pentru a fi contactat ulterior:</p>
                        <!-- TRATORIA FORM STARTS HERE -->
                        <form class="form" id="contactform" action="contact.php" method="post">
                            <div class="col-xs-12">
                                <div class="form-group">
                                    <input type="text" class="form-control" name="firstname" placeholder="Prenumele tau:">
                                </div>
                                <div class="form-group">
                                    <input type="text" class="form-control" name="lastname" placeholder="Nmele tau:">
                                </div>
                                <div class="form-group">
                                    <input type="email" class="form-control" name="email" aria-describedby="emailHelp" placeholder="Adresa ta de email:">
                                </div>
                                <div class="form-group">
                                    <input type="tel" class="form-control" name="phonenumber" placeholder="Numarul tau de telefon:">
                                </div>
                                <div class="form-group">
                                    <textarea class="form-control" name="message" rows="3" placeholder="Mesajul tau:"></textarea>
                                </div>
                            </div>
                            <button type="submit" class="btn btn-primary buton center-block">Trimite </button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<强>更新

你有一个BAD嵌套尝试这可以应用于嵌套背景img的一行,并嵌入你需要的所有col:

<div class="container">
    <div class="row backgroundimage">
        <div class="col-sm-12 hidden-md hidden-lg">
            <a href="#contactform"><button type="submit" class="btn btn-primary buton center-block buttonform">CONTACTEAZA-NE </button></a>
        </div>
        <div class="col-xs-offset-2 col-xs-8 col-xs-offset-2 col-md-offset-8 col-md-3 col-md-offset-1 col-sm-offset-4 col-sm-6 col-sm-offset-2 formular">
            <h3>CONTACTEAZA-NE</h3>
            <p>Lasa-ne mesajul tau pentru a fi contactat ulterior:</p>
            <!-- TRATORIA FORM STARTS HERE -->
            <form class="form" id="contactform" action="contact.php" method="post">
                <div class="col-xs-12">
                    <div class="form-group">
                        <input type="text" class="form-control" name="firstname" placeholder="Prenumele tau:">
                    </div>
                    <div class="form-group">
                        <input type="text" class="form-control" name="lastname" placeholder="Nmele tau:">
                    </div>
                    <div class="form-group">
                        <input type="email" class="form-control" name="email" aria-describedby="emailHelp" placeholder="Adresa ta de email:">
                    </div>
                    <div class="form-group">
                        <input type="tel" class="form-control" name="phonenumber" placeholder="Numarul tau de telefon:">
                    </div>
                    <div class="form-group">
                        <textarea class="form-control" name="message" rows="3" placeholder="Mesajul tau:"></textarea>
                    </div>
                </div>
                <button type="submit" class="btn btn-primary buton center-block">Trimite </button>
            </form>
        </div>
    </div>
</div>