纯粹 tise

经验是从磨练中积累出来的

万恶的 IE -- bootstrap 使用中的坑

bootstrap 中的 modal 特效用的很舒服,而且很霸气,但在一个小项目中的使用中遇到了 IE 给挖的坑了,现在想想,太恶心了。

本来在编辑器里复制这样的代码

<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3 id="myModalLabel">Modal header</h3> </div> <div class="modal-body"> <p>One fine body…</p> </div> <div class="modal-footer"> <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button> <button class="btn btn-primary">Save changes</button> </div> </div>

然后把相应的地方改成项目中需要用到的代码就完事了。

在 IE 9 中使用 rails 的 remote => true 这样默认的 请求时会出现问题。表单是没办法正常发送的。我和我们的神前端用了半天的时间把他搞定了。居然是因为表单包在了 div.modal-body

里面,然后无法正常解析出按钮。太让人郁闷了。我们的神前端啊,这样的问题让我去找估计还要再修炼500年。

不过 IE 真是恶霸,这么简单的事情都要折腾一下你。现在我怀疑微软的 IE 部门是不是一群笨蛋,IE 8中这样是使用时是没有问题的,升级的 IE 9 版本居然不兼容。没办法,比尔不在管理微软了,要在前几天他一定会开了那群笨蛋。

以此铭记,加以小心。

评论

热度(1)