加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

twitter-bootstrap – 更新Bootstrap到版本3 – 我需要做什么?

发布时间:2020-12-17 23:28:14 所属栏目:安全 来源:网络整理
导读:我是新来的Bootstrap,有旧版本2.3.2。 版本3已发布。如果我想使用最新版本,我只是简单地替换CSS和Javascript文件? 解决方法 从 http://getbootstrap.com/下载最新版本或将css和js文件替换为最新版本或使用CDN( http://www.bootstrapcdn.com/) 迁移你的htm
我是新来的Bootstrap,有旧版本2.3.2。

版本3已发布。如果我想使用最新版本,我只是简单地替换CSS和Javascript文件?

解决方法

>从 http://getbootstrap.com/下载最新版本或将css和js文件替换为最新版本或使用CDN( http://www.bootstrapcdn.com/)
>迁移你的html,确实读 http://bootply.com/bootstrap-3-migration-guide.你可以尝试 http://twitterbootstrapmigrator.w3masters.nl/或 http://code.divshot.com/bootstrap3_upgrader/(提供检查表)

> Images not responsive by default in Twitter Bootstrap 3?
> Styling Twitter’s Bootstrap 3.x Buttons
> Change navbar color in Twitter Bootstrap 3

> remove html5shiv原因TB下载支持IE7和Firefox 3.x添加html5shiv.js以添加对HTML5元素的支持到IE8
>为IE中的媒体查询支持添加respond.js(https://github.com/scottjehl/Respond)。注意这不适用于CDN,请参阅:IE8 issue with Twitter Bootstrap 3
>如果你使用Glyphicons,你必须从http://glyphicons.getbootstrap.com/添加它们(图标已经移动到单独的存储库。)Glyphicons从RC2(字形格式的Glyphic字体格式,从Glyphicon Halflings集)
>如果你使用JavaScript Typeahead组件,你将不得不集成https://github.com/twitter/typeahead.js/(因为typeahead javascript被丢弃)参见:Typeahead problems with Bootstrap 3.0 RC1或使用“老”插件:https://github.com/bassjobsen/Bootstrap-3-Typeahead,参见:http://stackoverflow.com/questions/18615964/ajax-call-in-bootstrap-3-0-typeahead/18620473
>切换到最新版本的jQuery 1.x(不要使用2.x版本,因为jQuery 2.x不支持IE8)
>如果您使用向您的代码添加或插入html的第三方小部件(例如addthis.com,sharethis.com和Google地图),请为框大小创建一个包装器,请参阅:Right border of the AddThis counter missing with Twitter’s Bootstrap 3

其他:

Bootstrap 3切换到box-sizing:border-box为什么?:http://stackoverflow.com/a/18858771/1596547

注意对IE7的支持已被删除。 https://github.com/coliff/bootstrap-ie7尝试使用一些条件CSS添加CSS部分。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读