class and ID
When you write an element to define a class or ID, you can omit the previous element limitation, because the ID is unique in a page, and las s can be used multiple times on the page. It makes no sense to limit an element. For example:
Div # Content {/* declarations */}
Fieldset. Details {/* declarations */}
Can be written
# Content {/* declarations */}
. Details {/* declarations */}
This saves some bytes.
5. Default Value
Generally, the default value of padding
css| Tips | page | style sheet
CSS style sheet Common tips
· The UL label in Mozilla defaults to have the padding value, but in IE only margin has the value.
· The same class selector can appear repeatedly in one document, but onl
Recently I found my css style sheet in. it works normally during tests in net2.0, but it becomes problematic when it is published to IIS. After the page is opened for the first time, the style sheet does not work, if you click the link on the page to return to this page, it
css| Tips | page | style sheet
1. CSS Font Property shorthand rulesGenerally using CSS to set font properties is done:
Font-weight:bold;
Font-style:italic;
Font-varient:small-caps;
Font-size:1em;
Line-height:1.5em;
Font-family:verdana,sans-serif
But you can also write them
css| Strategy | style Sheet | grammar
Discard the visual editor to write CSS
If you have an example of CSS, you might ask, what am I going to do in DW to have CSS like the following?. test1,.test2 {color:purple!important;color:blu
What is inheritance?To understand the inheritance of CSS style sheets, we should first start with the document tree (html dom. The document tree consists of HTML elements.
Similar to the family tree, the document tree also contains the ancestor, descendant, father, child, and brother ^_^. This is easy to understand. I will not go into details here. For more information, see Google.
Then CSSStyle
css| Style Sheet | syntax
Common CSS Abbreviations Grammar summary
Using abbreviations can help reduce the size of your CSS files and make it easier to read. The main rules for CSS abbreviations are as follows:
Color
16 The colo
Note the differences between the Code and the traditional DHTML. In DHTML, you can change the style by directly modifying specific elements on the page. The code here modifies the style sheet.View the compatibility list of W3C DOM-CSS here.DefinitionA page always contains one or several style sheets. A
css| Tips | page | style sheet
♠ul tags in Mozilla default is padding value, and in IE only margin have a value.♠ the same class selector can appear repeatedly in one document, but only once for the ID selector, and for a label to use both class and ID for CSS definition, and if there is a duplicate definition, the ID
css| Skills | website Refactoring | style Sheet | Optimize one, use CSS abbreviation
Using abbreviations can help reduce the size of your CSS files and make it easier to read. The main rules for CSS abbreviations refer to the com
! Important increase the importance ofOrder of Importance:1 user-style labeled!important2 author style labeled!important3 Author Styles4 User Styles5 styles for browser/user agent AppsThen the order of rules is determined according to particularity.(2) particularityParticulars Four composition Grades: A, B, C, DIf the style is inline
;YesH2> PID= "Hang">span>Beijingspan>spanclass= "Yanse">Shanghaispan>span>Hong kongspan>spanclass= "Yanse">Hainanspan>P> Body>HTML>0.css Hack:Different browsers are based on different kernels, and the parsing of CSS is not the same. This directly results in a different page effect for the build. For example, the most direct impact is reflected in the frame model of the distance of understanding. H
css| Tutorial | style sheet
Highly recommended: A very good stylesheet CSS Tutorial (table below)
Highly recommended: very good style sheet CSS Tutorial (1)
Highly recommended: very g
The CSS () method is used to change the existing CSS style sheet. The css () method is diverse in usage. For example, to change the link color, if you need to change multiple style attributes, you can define attribute variables fi
Second, selectorGeneral syntax for inline, external style sheets:Selector Selector{style = value;style = value;style = value;......}Take the following HTML example to learn how to differentiate between the various styles of selectors"Content-type"Content="text/html; Charset=utf-8"/>"file:///E|/page/untitled-2.
4. Create Dreamweaver (style sheet CSS) and dreamweavercssStyle sheet style
It can be written in the body or in the head.
1, HeadEx.(Style sheet selector)
2BodyStatement in:
Custo
is (CSS) rules[0], the second is (CSS) rules[1] and so on.
Copy Code code as follows:
var therules = new Array ();
if (document.stylesheets[1].cssrules)
Therules = Document.stylesheets[1].cssrules
else if (document.stylesheets[1].rules)
Therules = Document.stylesheets[1].rules
Therules now contains all the style rules. Number of r
box by default hidden trim and hide overflow content scroll plus scroll bar auto automatically if overflow add scroll barVisibility:hidden; Visibility hidden hidden visible but still occupying positionDisplay:none; Occupy space none occupies position block as block-level element before and after line wrap inline as inline element does not wrapopacity:0.5; Transparency 0-1 0 is full transparent 1 is opaqueborder-radius:10px; The rounded corners of the element can be filled with pixels or percent
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.