More and more large Web sites began to focus on, using CSS, for the management of multiple complex CSS files is obviously a challenge. Here is the first part of the two series, the first part of which we focus on the management style of view, and based on the conclusion of a workable solution. In the second part, we will compare the above conclusions.Powerful CSS
First, CSS descendant selector detailed1, Vivid introduction of basic conceptsA tag is nested B inside another label A, B is the descendant of a.Moreover, the offspring of B are also descendants of a, which is called "children and grandchildren endless also".Like what:Descendant selectors are used to select the descendants of a tag;Adding a "space" between the two selectors makes up the descendant selector, and the one behind the space is the descenda
If you develop web-related applications or websites, you must know the importance of CSS for page layouts. In this CSS tip we'll introduce the page loading process to help you better implement the page layout.
Introduced
Before we begin the formal introduction of the page process, we need to learn a few different types of HTML elements and how they are displayed by default. Here we mainly focus on two typ
For example, you have the following code:
h2 {color:red;}
. abc {color:red;}
. abccom {color:red}
Then you can write this:
h2,.abc,.abccom {color:red;}
Using a combination, you can define multiple CSS at a time, saving you a lot of bytes and time.
CSS Nesting
CSS structure is good, there is no need to use too many classes or identity selectors. This is because yo
CSS Content PropertiesThe Content property is used in conjunction with : Before and : after pseudo-elements to insert a build. This property is used to define the generated content that is placed before or after the element. By default, this is often the inline content, but the type of box that the content creates can be controlled with the property display . Attention:Works only under modern browsers that are available in
CSS PicturesWhen there is one or more pictures on a webpage, and the size of these pictures is larger, in order to make the page layout more compact and reasonable, we can put these pictures in a picture library, can effectively prevent the image too large may affect the layout of the page. With CSS we can do this, and here's a simple example:Neymar door break Instant street dance Entertainment passion Mexi
Article Introduction: the future of CSS: the transformation of the game Flexbox.
HTML5 and CSS3 provide Web developers with new syntax tags, local animation tools, server-side fonts, and more, these are not the end. Developers are struggling to dig a trench for web design-the real page typesetting tool, in fact, even the most promising CSS3 are still on the horizon.
While it can create surprisingly complex layouts, such as
css| Tutorials | Getting Started | grammar
1. Basic grammar
The definition of CSS is composed of three parts: selectors (selector), attributes (properties), and values (value).
The basic format is as follows:
selector {Property:value}
(Selector {property: value})
A selector can be a variety of forms, typically the HTML tag you want to define a style for, such as body, P, TABLE ..., you can define its proper
A CSS language is a style definition language that does not contain any markup.
For example:. myStyle1
{
Border-style:outset;
Border-width:medium;
Background-color: #006600;
text-indent:42px;
}
The relationship between the two:
1, CSS code can be written in the HTML tag, can be centrally written in HTML tags , can also be written in other tags. such as:
2, CSS c
CSS optimization usually includes two aspects:Format CSS and streamline CSS.
The method to streamline CSS is to merge elements with the same attributes, but this reducesCodeThe readability of the Code makes it very difficult to maintain the code in the later stage. If you do not pay attention to it, an error will occ
A netizen has a headache problem. Need to be revised after several changes to the Web site, need to eliminate redundant code, in the CSS style re-engineering, more headaches, not only to the existing style of consolidation and streamlining, but also need to increase the skin function for the site.
It's not hard to see that this is a very frustrating job, facing a line of code scalp numbness. If we form good habits, it may make work easier. On this is
CSS compatibility problem is already an important part of the CSS page layout technology, but also let the vast number of csser headaches, although introduced a lot of relevant knowledge and skills, but with the IE8 more and more extensive installation applications, the IE7 and IE8 compatibility issues, also quite concerned about.In the previous article mb5u.com to explain to everyone, IE8 will be the gospe
CSS there are bugs, but how can we remember these bugs, so that in the future to write CSS code can be a good response, this is not, the conscientious to write such a CSS bug jingle, or very good:
One, ie border if no, should pay attention to, must be the height set has been forgotten;
Two, the float has the reason, wants the parent layer to contain, follows fl
Style sheet common notation and characteristics (combination, inheritance, relevance, weight, cascade, importance)1. Combination of styles: Combine selectors with the same declaration definition and separate them with commas. -For example: paragraph element p, cell element TD, and class C1 can use the same style:p,td,.c1{font-size:12pt;font-family: blackbody; color:red}2. Inheritance of styles: If the child element is undefined, it inherits the definition of the style of the ancestor element. H
This article is written in notes form.1, CSS class selector detailedHttp://www.w3school.com.cn/css/css_selector_class.aspKnowledge Points:(1) The premise of using class selector is to add a class attribute to the tag, such as (2) The syntax of the class selector is: *.important {color:red;}, but generally omits the preceding wildcard selector, written as. important {color:red;}, which adds a style to all ta
Pure CSS implements the ToolTip prompt, CSS arrows and the continuation of the shape--Add a border to the ToolTip boxStudied: 41856895SOURCE Worship: Body > class= "Demo">div>Body >. Demo{Background-color:Gray;Height:100px;position:relative;width:100px;Border:2.75px Solid Red; }. Demo:after,.demo:before{content:"';position:Absolute; }. Demo:after{//height:20px;//width:20px;//background:Yellow;//border
Core tips: CSS tips: About CSS hack and float closure
First, CSS HACK
The following two methods can solve almost all hack today.
1,!importantWith the support of IE7 to!important, the!important method is now targeted only at IE6 hack. (Note the wording. Remember that the claim position needs to be advanced.)
2, Ie6/ie77 to Firefox*+html and *html is the uniq
Article Introduction: but the exception of 12px Chinese characters is that the 12px (1.2em) size of Chinese characters obtained by the above method is not equal to the font size defined directly with 12px, but slightly larger. This problem Jorux has been resolved, only in the body selector in the 62.5% to 63% can be normal display. The reason may be that when IE deals with Chinese characters, the precision of floating-point values is limited. Don't know if it
Quoted here is Jorux's
The article is some old, but very valuable reference. Editor's note.
The priority problem is actually a problem of conflict resolution, when the same element (or content) is selected by the CSS selector, it is necessary to choose different CSS rules according to priority, which involves a lot of problems.
The first is the CSS rules of specificity (specificity), c
Article Introduction: CSS Transformations (transition)
-webkit-transition
-moz-transition
-o-transition
transition
CSS Property
The property being transformed (for example, color).
Duration
The duration of the transformation, usually measured in seconds (e.g.,. 25s).
Timing function
Allows you to control how long the duration is calculated. Instead of using a simple linear calculation, y
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.