gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 04:48:37 24 4
gpt4 key购买 nike

我是 Bootstrap 新手,使用的是旧版本 2.3.2。

版本 3 已发布。如果我想使用最新版本,是否只需替换 CSS 和 Javascript 文件即可?

最佳答案

  1. http://getbootstrap.com/下载最新版本或者将 css 和 js 文件替换为最新版本或使用 CDN ( http://www.bootstrapcdn.com/ )

  2. 迁移您的 html,是的,确实已阅读 http://bootply.com/bootstrap-3-migration-guide 。你可以试试http://twitterbootstrapmigrator.w3masters.nl/http://code.divshot.com/bootstrap3_upgrader/ (也提供 list )

  3. 删除 html5shiv,导致 TB 放弃对 IE7 和 Firefox 3.x 的支持 添加 html5shiv.js 以向 IE8 添加对 HTML5 元素的支持

  4. 添加 respond.js ( https://github.com/scottjehl/Respond ) 以支持 IE 中的媒体查询。注意,这不适用于 CDN,请参阅:IE8 issue with Twitter Bootstrap 3

  5. 如果您使用 Glyphicons,则必须从 http://glyphicons.getbootstrap.com/ 添加它们。 (图标已移至单独的存储库。) 自 RC2 以来,字形又回来了(来自 Glyphicon Halflings 集的 180 个字体格式的字形)

  6. 如果您使用 Javascript Typeahead 组件,则必须集成 https://github.com/twitter/typeahead.js/ (导致 typeahead javascript 被删除)另请参阅:Typeahead problems with Bootstrap 3.0 RC1或者使用“旧”插件:https://github.com/bassjobsen/Bootstrap-3-Typeahead ,另请参阅:https://stackoverflow.com/questions/18615964/ajax-call-in-bootstrap-3-0-typeahead/18620473

  7. 切换到最新版本jQuery 1.x (不要使用2.x版本,因为jQuery 2.x不支持IE8)

  8. 如果您使用在代码中添加或插入 html 的第三方小部件(例如 addthis.com、sharethis.com 和 Google map ),请为框大小创建包装器,请参阅:Right border of the AddThis counter missing with Twitter's Bootstrap 3

其他:

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

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

关于twitter-bootstrap - 将 Bootstrap 更新到版本 3 - 我需要做什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17974998/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com