CSS primary entry: Since the definition of categories
CSS primary entry: Since the definition of categories - Welcome to the CSS software tutorial area天æž
Since the definition of categories
Today said there is a new knowledge "category." In fact, this knowledge is no stranger! In retrospect, in the HTML tags, called class attribute that does not explain what this attribute is used. In fact, it is not explained, but also will not explain, and so they do not have that, until today. This class attributes, it will be interpreted as "class" attribute, it is what effect? It will allow us to the different labels use the same CSS settings, for example as follows: In the study, see the textbooks often focused on the local, red or other colors marked. If today we are at the website also would like to place some of the more important "red, bold", how would you do? :
Source code "<font color =" Red "> <b> website Taoba </ b> </ font>" show results "page Taoba"Use CSS to achieve focused
Using the above method that is a very good! Simple with easy! However, imagine a situation … If our website has more than 1,000 so-called "focus" Today, you suddenly want to focus on them altogether into the "red, bold," and you know how to do? At this time, we speak with the CSS to help us solve the problem! Moreover, our "custom type" will use!
Style grammar <style type = "text / css">. Important (color: red; font-weight: bold)
</ Style> application "<font class =" important "> website Teaching Network </ font>"
First of all, we in the CSS in a table called themselves the important category, and then use class attributes, apply the website, it is not difficult! If subsequent to the "red" into the "blue", as long as the change in the types of settings on the line! Whether there are tens of thousands of pages of the "focus" are not afraid!
Since the definition of categories of usage
Seen since the definition of categories of about usage, and then do a detailed explanation of how the definition of categories? Since the definition of categories of very simple methods and the general statement that's CSS! The only difference is that, CSS statement was directed at any particular labels, and custom categories is not directed at any particular label, but to their own name!
Style grammar <style type = "text / css">. Important (color: red; font-weight: bold)
</ Style>
Above as an example,. Important (color: red; font-weight: bold) is our custom categories, one of () part of the CSS and general statement the same way! Differences in the front. Important, that's right! Important that we set the name, a name can be called. Attention! Remember that in front of the name of the former definition of a small increase ".", And that since the completion of the definition of a category! This category can be used to call class! Applied to any label!
Tags: css entry






Leave a Reply