The bootstrap of H5 framework (II.)
Suddenly feel do not know what to write, the brain is not water, may be because tonight to go out of the waves, haha ~ ~ ~ in advance to remind everyone to go home on Christmas Eve Oh, 00000000000 so many eggs. Go on
The previous article has already bootstrap to understand a general, and then we will start to learn about it inside the things.
Browser support
The old browser may not be well supported
Bootstrap supports Internet Explorer 8 and later versions of IE browser
CSS Source Research
Didn't we introduce the following files in the head?
<!--new Bootstrap core CSS file--<link rel= "stylesheet" href= "http://cdn.bootcss.com/bootstrap/3.3.0/css/ Bootstrap.min.css "> <!--Optional bootstrap theme files (not normally introduced)--<link rel=" stylesheet "href="/HTTP/ Cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap-theme.min.css "> <!--jquery file. Be sure to introduce-<script src= "Http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js" ></script before Bootstrap.min.js > <!--latest Bootstrap core JavaScript file--<script src= "http://cdn.bootcss.com/bootstrap/3.3.0/js/ Bootstrap.min.js "></script>
OK, look at the core, here from BOOTSTRAP.MIN.CSS, this is compressed, look at the best look without compression version: Http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.css
I'm talking about a non-condensed version of CSS.
266 lines before basically is the label formatting, initialization of some things, in order to let some students understand better, I put some special general mention.
First one
Input[type= "Number"]
CSS Property Selector, perhaps for beginners, or not written small pots of friends are not familiar with, this attribute is to <input type= "number"/> tag for style rendering, knowledge this, I think you know the other how to write
A second
Display:block;
This you may say: "This I know, conversion element characteristics AH ~ ~ ~", haha, yes, but you know the specific turn will be how, or why to turn, and what is the corresponding?
Well, I'm going to say (the friends will not have to see), in the HTML there are "block elements" and "inline elements" said, their respective default main features:
Block element: Exclusive row, can set width, height, default width is 100% of the parent container
Inline element: Not exclusive row, cannot set width, height
Know this, then add a display:block to the element; is to convert elements into block elements so that the elements can be set to width and height. OK, now you know how to use this.
A third
Color: #000!important;
Well, the front part must know, back! What the hell is important??? Optimization level, that is, when it acts on an element, as long as it is supported by the browser will take precedence to color: #000, regardless of the following the same property is overwritten (of course, the overridden property value does not add!) Important of the case).
Fourth one
@font-face
267 line, this property is inside the CSS3, the main function is to embed the custom Web fonts into your Web page, so that your Web page does not show some of the fonts that are not on a computer. In other words, this is called the font icon, font icon Many systems have, not bootstrap have, oh, the advantage is to be able to use icons like fonts, like what change color, set general what. Well, how do you use it?
Haha, in fact, no tube, has been finished ~ ~ ~ See below
@font-face { font-family: ' glyphicons halflings '; Src:url ('.. /fonts/glyphicons-halflings-regular.eot '); Src:url ('.. /fonts/glyphicons-halflings-regular.eot #iefix ') ...}
See, CSS introduced a few files, in the upper directory of the fonts file, self open to see, not just these several, of course, you do not have to control it, know how to go on OK
More font icons, see this: http://noob.d8jd.com/noob/5/117.html
For example:
<span class= "Glyphicon Glyphicon-refresh" ></span>
A refreshed font icon is coming out.
273 Rows to 885 lines are all about font-related CSS properties
Fifth one
@media
It is important to do self-adaptation, and first look at what the ghost is.
Font is the meaning of the media, in fact, the principle is to specify different media (devices) to apply different styles
@media (min-width:768px) {//>=768 device} @media (min-width:992px) {//>=992 device} @media (min-width:1200) {//>=1200 Device} Note The order, if you put @media (min-width:768px) written down so very tragic, @media (min-width:1200) {//>=1200 device} @media (min-width:992px) { >=992 device} @media (min-width:768px) {//>=768 device} because if it is 1440, your 1200 will fail because of 1440>768. So when we use the min-width, the small placed above the large in the following, similarly if the max-width is large in the above, small under the @media (max-width:1199) {//<=1199 device} @media ( max-width:991px) {//<=991 device} @media (max-width:767px) {//<=768 device}
again: if it is min-width set, small on top, big in the bottom, max-width set, big on top, small in the bottom
Know this, then we think it can be mixed use it. Specify a range, see below:
@media screen and (min-width:960px) and (max-width:1199px) {...} @media screen and (min-width:768px) and (max-width:959px) {...} ....
I will not say, I believe you can read
Other seems to be nothing, back in the example when we go back to analyze the corresponding
-Reprint
The bootstrap of H5 framework (II.)