在同一页面上实现不同引导程序版本的最佳方法? [英] Best way to implement different bootstrap versions on the same page?

查看:51
本文介绍了在同一页面上实现不同引导程序版本的最佳方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用asp.net时,我有一个方案,其中母版页正在实现BootStrap的2.2版.但是有些内容我想用于BootStrap 3.3.如果我以任何方式尝试通过2.2升级或实现3.3,那么它将破坏我的一些代码.关于如何选择性升级" HTML/BootStrap来表达"Div"标签内的所有内容的任何想法?

In using asp.net I have a scenario where the master page is implementing version 2.2 of BootStrap. But there is some content I'd like to use BootStrap 3.3 for. If I try and upgrade or implement 3.3 over 2.2 in any ways, it breaks some of my code. Any ideas for how to "selectively upgrade" HTML/BootStrap to say, everything that's inside a "Div" tag?

推荐答案

取决于您希望获得的hacky.如果仅是一项功能,只需将Bootstrap 3.3中的.css部分复制到其自己的css文件中,然后在 之后将其导入到该css文件中,即可在构建脚本中加载2.2版本,也可以在标签中有2.2版本.

Depends on how hacky you want to get. If it's just one feature, just copy the part of the .css from bootstrap 3.3 you want in its own css file and import this css file after the 2.2 version is loaded either in your build script or after your 2.2 version in your tag.

如果您对哪个功能(如果还包括js文件)有更具体的疑问,那么我们将不得不更深入地研究.

If you have a more specific question about which feature (if you're including js files as well) then we'll have to dig deeper.

警告:您必须小心从2.2覆盖的内容,因为它可能会破坏其他CSS部分.正如@DavidG所指出的那样,我将避免完全这样做.

Warning: You have to be careful with what you're overwriting from the 2.2 as it can break other css parts. And as @DavidG pointed out, I would avoid doing this entirely.

这篇关于在同一页面上实现不同引导程序版本的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆