本文介绍了Bootstrap 3水平表格/ IE8支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我正在使用Bootstrap 3开发一个网站。这个网站需要在IE8中正确呈现(是的,我知道)。我现在正在做横向表格。使用Bootstrap文档提供的代码:

 < form class =form-horizo​​ntalrole =form> 
< div class =form-group>
< label for =inputEmail1class =col-lg-2 control-label>电子邮件< / label>
< div class =col-lg-10>
< input type =emailclass =form-controlid =inputEmail1placeholder =Email>
< / div>
< / div>
< div class =form-group>
< label for =inputPassword1class =col-lg-2 control-label>密码< / label>
< div class =col-lg-10>
< input type =passwordclass =form-controlid =inputPassword1placeholder =Password>
< / div>
< / div>
< div class =form-group>
< div class =col-lg-offset-2 col-lg-10>
< div class =checkbox>
< label>
< input type =checkbox>记住我
< / label>
< / div>
< / div>
< / div>
< div class =form-group>
< div class =col-lg-offset-2 col-lg-10>
< button type =submitclass =btn btn-default>登录< / button>
< / div>
< / div>
< / form>

并注意到它在IE8中无法正常显示。即使转到文档网址:





您需要在网站上添加respond.js以便IE8处理媒体查询。



更多信息:


So I'm working on a website using Bootstrap 3. This website needs to render properly in IE8 (yes I know). I'm working on a horizontal form right now. Used the code provided by Bootstrap documentation:

<form class="form-horizontal" role="form">
    <div class="form-group">
    <label for="inputEmail1" class="col-lg-2 control-label">Email</label>
    <div class="col-lg-10">
    <input type="email" class="form-control" id="inputEmail1" placeholder="Email">
    </div>
    </div>
<div class="form-group">
<label for="inputPassword1" class="col-lg-2 control-label">Password</label>
<div class="col-lg-10">
  <input type="password" class="form-control" id="inputPassword1" placeholder="Password">
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
  <div class="checkbox">
    <label>
      <input type="checkbox"> Remember me
    </label>
  </div>
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
  <button type="submit" class="btn btn-default">Sign in</button>
</div>
</div>
</form>

And noticed it does not display properly in IE8. Even by going to the documentation URL:

http://getbootstrap.com/css/#forms-horizontal

does not display properly in IE8.

Do I have to write forms in a specific format in order to make them work in IE8?

Thanks!

解决方案

Take a look at the explanation here: IE8 issue with Twitter Bootstrap 3

You'll need to add respond.js to your site for IE8 to process media queries. https://github.com/scottjehl/Respond

More here: http://getbootstrap.com/getting-started/#browsers

这篇关于Bootstrap 3水平表格/ IE8支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 01:53