bootstrap 不支持ie怎么办


当前第2页 返回上一页

必须先引用css在引用js

1

2

<link rel="stylesheet" type="text/css" href="bootstrap.min.css" media="screen"/>

<script type="text/javascript" src="js/respond.min.js"></script>

6、DOCTYPE前后有空行

1

2

3

<!DOCTYPE html>

这里有空格也不行,要去掉空格

<html>

7、也可以手动修改bootstrap.css

如果您使用的是bootstrap2.1.1,修改了navbar-inner{ filter:none}可解决问题,如果使用的是3.0+版的,没有这段代码了,详细介绍请看连接

1

http://stackoverflow.com/questions/12460190/bootstrap-navbar-does-not-show-in-ie8

8、使用quirks mode(兼容模式)

定义网页时,向后兼容旧的浏览器的模式就是quirks mode,与之对应的是“标准模式”就是 standard mode。具体是将<!DOCTYPE html>写成以前的这种

1

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

这个我测试过,不可行

最后我在IE11下测试通过,但是在IE8下测试,有发现一个问题placeholder不被支持

下面是解决IE支持placeholder的方法

本文引用的jquery是1.11.1测试通过,先引用jquery

1

<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"></script>

也可以用其他的jquery版本

再引入

1

<script type="text/javascript" src="js/jquery.placeholder.js"></script>

jquery.placeholder.js这个文件的下载地址https://github.com/mathiasbynens/jquery-placeholder

然后再文件中加入一下代码

1

2

3

4

5

6

<script type="text/javascript">

    $(function () {

        // Invoke the plugin

        $('input, textarea').placeholder();

    });

</script>

如果我这里为涉及到的或者问题依然没有解决的请移步http://hustlzp.com/post/2014/01/ie8-compatibility更加详细

以上就是bootstrap 不支持ie怎么办的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

spss中怎么用bootstrap做中介分析

bootstrap有cdn吗

bootstrap如何使用路径分页标签

bootstrap拖动布局元素怎么做

bootstrap怎么实现分页技术

bootstrap怎么实现可关闭tab

bootstrap2和3的区别是什么

如何解决bootstrap乱码问题

bootstrap用来做什么

bootstrap有哪些优势

更多相关阅读请进入《bootstrap》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...