As the first article of this study note, we will start with an introduction to Bootstrap, just like other articles in the series, and then proceed step by step. Preface In the previous section, https://www.jb51.net/web/248352.html mainly briefly introduced Bootstrap. It is not difficult to find from the Chinese website http://www.bootcss.com/ that there are now documentation descriptions for two versions. It seems that the difference between the two versions is quite large. However, judging from the update of Visual Studio 2013, Microsoft has added the new version of Bootstrap3 to VS, so there is nothing much to say, and there is no need to worry about learning Bootstrap3. Download BootStrap The documents on the official website are very detailed and simple, and there are multiple ways to download them. For us developers, the easiest way is probably to directly download the compiled and compressed CSS and JavaScript files, which also include font files, but do not include documents and source code files. After opening the unzipped package, you can find that it contains three folders: css, fonts, and js. You can view the files in three folders This is the most basic Bootstrap organization: uncompressed files that can be used directly in any web project. We provide minified (bootstrap.min.*) and unminified (bootstrap.*) CSS and JS files. The font icon files come from Glyphicons. The bower.json file lists the jQuery versions that Bootstrap supports. You can see that the version of the dependent jQuery library is >= 1.9.0. Next, visit http://jquery.com/ I will download the latest version 2.03 You can directly access http://code.jquery.com/jquery-2.0.3.min.js through IE Save it to the js folder under the Bootstrap folder. Note: All Bootstrap plugins require jQuery. We recommend using the compressed version in formal projects because it is smaller in size (with the comments and spaces removed). Using Bootstrap in your website We created a simple basic template
1. First, we can reference Bootstrap's style file as a web page
2. If you need to use the JavaScript plug-in provided by the Bootstrap architecture, you need to link the js file of the architecture to the web page. As mentioned above, JavaScript plug-ins are dependent on the jQuery library, so of course we also need to link and reference the jQuery library file
3. The viewport <meta> tag, which can modify the display on most mobile devices to ensure proper drawing and touch screen scaling.
4. We use some new tags in HTML5, but browsers below IE9 do not support these tags, and cannot add styles to these tags. So to fix this problem we need to link the referenced files as follows
This means that if the user's IE browser version is less than IE9, then these two js file libraries will be loaded, and now these new tags can be used and styles can be added to these tags. Just like this, our simplest Hello World! page is presented to you. Summarize We also enabled responsive layout above. Of course, some websites may not require a responsive layout, so we need to manually disable this layout. This document also has detailed instructions. In the next section, we will mainly learn about the layout of Bootstrap. |
<<: Disadvantages and reasonable use of MySQL database index
>>: React implements the addition, deletion, modification and query of todolist
Add secure_file_priv = ' '; then run cmd ...
Table of contents The essence of QR code login Un...
When installing in MySQL 8.0.16, some errors may ...
Table of contents Preface Preliminary preparation...
In the XHTML language, we all know that the ul ta...
1. How to monitor MySQL deadlocks in production e...
Here is a record of how to make a scroll bar appe...
background As the number of application systems c...
Table of contents 1. Pre-analysis 1. Variable pre...
Preface Recently, I found a pitfall in upgrading ...
Table of contents 1.1 Java environment as a prere...
1 The select tag must be closed <select><...
The installation of compressed packages has chang...
1. Install Docker 1. I installed Centos7 in the v...
Method 1: Install the plugin via npm 1. Install n...