Bootstrap: How do I identify the Bootstrap version?

后端 未结 11 1242
借酒劲吻你
借酒劲吻你 2021-01-31 12:43

I want to update Bootstrap on a site, but I don\'t know the installed version.

How can I identify the bootstrap version, with only bootstrap.css and bootstrap.min.js fil

相关标签:
11条回答
  • 2021-01-31 13:40

    Shoud be stated on the top of the page.

    Something like.

    /* =========================================================
     * bootstrap-modal.js v1.4.0
     * http://twitter.github.com/bootstrap/javascript.html#modal
     * =========================================================
     * Copyright 2011 Twitter, Inc.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     * http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     * ========================================================= */
    
    0 讨论(0)
  • 2021-01-31 13:40

    An easy way to do this, without searching files or folders would be:

    • Open your web page on browser
    • press ctrl+U
    • search boostrap.min.js or boostrap.min.css, then click it (it would open source file)
    • at first line(commented) you should see boostrap version
    0 讨论(0)
  • 2021-01-31 13:44

    That comment looks like it is a custom version of Bootstrap v2.3.3, here is the default header in the .css, notice the last comment line:

    /*!
     * Bootstrap v2.3.2
     *
     * Copyright 2013 Twitter, Inc
     * Licensed under the Apache License v2.0
     * http://www.apache.org/licenses/LICENSE-2.0
     *
     * Designed and built with all the love in the world by @mdo and @fat.
     */
    

    What are you trying to accomplish? If it's customization then you have a set of files to work with though that seems like a bad idea. Otherwise, I would suggest going with the full build of v4.1.x since that is the current release.

    0 讨论(0)
  • 2021-01-31 13:44

    To expound more on @vrian's answer

    To view the bootstrap version of a website in your web browser, do the following:

    First Method:

    • Open the website on your favourite browser
    • Press Ctrl + U to view the web page source
    • Look at the head section for a file named boostrap.min.js or boostrap.min.css. It should look like this <link href="assets/css/bootstrap.min.css" rel="stylesheet" />
    • Then click it to open the source file
    • This will display the bootstrap version of the website. It should look like this: Bootstrap v4.4.1 (https://getbootstrap.com/)

    Second Method:

    • Open the website on your favourite browser
    • Press Ctrl + Shift + I to inspect the webpage element
    • In the inspect console, click on the Style Editor tab
    • And then click on boostrap.min.css
    • This will display the bootstrap version of the website. It should look like this: Bootstrap v4.4.1 (https://getbootstrap.com/)

    That's all

    I hope this helps

    0 讨论(0)
  • 2021-01-31 13:47

    In the top of the bootstrap.css you should have comments like the below:

    /*!
     * Bootstrap v2.3.1
     *
     * Copyright 2012 Twitter, Inc
     * Licensed under the Apache License v2.0
     * http://www.apache.org/licenses/LICENSE-2.0
     *
     * Designed and built with all the love in the world @twitter by @mdo and @fat.
     */
    

    If they are not there, then they have probably been deleted.

    VERSIONS:

    You can review version history here. Backward compatibility shouldn't be broken if the source is v2.0.0 (Jan 2012) and above. If it is prior to v2.0.0 there are details on upgrading here.

    0 讨论(0)
提交回复
热议问题