1. style sheet Cascading Style Sheet
CSS Benefits:
Separation of content from performance
Web page performance is unified, easy to modify
Rich styling to make Web page layouts more flexible
Reduce the amount of Web page code, increase the browsing speed of We
{background:url (minus0.gif) no-repeat Center}
#mtvroot. Expand. Pm1{background:url (minus1.gif) no-repeat Center}
#mtvroot. Expand. Pm2{background:url (minus2.gif) no-repeat Center}
#mtvroot. Expand. Pm3{background:url (minus3.gif) no-repeat Center}
The above CSS is a section of a pattern that I dynamically generated in my script, and I post it to help explain it later. After using the style
Style Sheet CSS plays an important role in Web pages. Its use has always been a hot topic. CSS is short for Cascading Style Sheet ". CSS can define almost all webpage elements. Although
========================
CSS Cascading Style Sheets
========================
Naming rules: Use letters, numbers, or underscores and minus signs, and do not start with numbers
First, the syntax of CSS
-----------------------------
Format: Selector {property: Value; property: Value; property: value; ...}
Where selectors are also called selectors
Comments in
The basics of CSS style sheets that are recently in a bad patch. The last time we studied the conflict problem of CSS style sheet. This is the learning of CSS inheritance features.What is CSS
It has been more than a year since I used xhtml + CSS to build a website. More than a year of practice has accumulated some experience. Now I will write this article to summarize it. There is a key issue in the process of using xhtml + CSS to build a website: planning and managing the CSS style sheets of the website.
Style sheet CSS occupies a very important place in the Web page, and its use has been a hot topic of discussion. CSS is a shorthand for cascading style sheet, translated as "cascading style
Classification|------Inline in the label, accurate control, poor code reuse|---------style= Stylestyle= "background:yellow; width:100px; height:100px;" > Div > style= "background:red; width:100px; height:100px;" > Div >|------embedded in the |---------style>#first{background:Pink;width:200px;Height:100px;}#second{background:Blue;width:200px;Height:100px;
JavaScript access to modify the style sheet, you can easily modify the page dynamically:A CSS style that accesses the style property in an elementThis can be accessed directly using the style object, for example:The way to access
Css|web|web Standard |xhtml| style sheet
Web standards divide Web pages into three separate components:
* Structure: Html,xhtml,xml
* Performance: Css1,css2
* Behavior: ECMAScript, DOM
Web standards so far Han has to the appearance of the aesthetic to do any guidelines and precepts, the site's appearance and feelings do not have any restrictions, they simply enab
css| Web site Acceleration | The key indicator of the usability of a stylesheet Web site is speed, or rather, how quickly a page can appear in a visitor's browser window. There are a number of factors affecting speed, including the speed of the Web server, the Internet connection of visitors, and the size of the file that the browser must download. Although you can't control the speed of your servers and connections, you can control the size of the fi
best to add a comment after the name so that future documentation can be generated.
Iii. on the nature of inheritance
In CSS, make good use of inheritance. For example, in two nested div, the parent element defines the Background-color property as black, and if the background of the child element is black, there is no need to repeat the definition. Being good at using the inheritance of CSS can make code m
css| Skills | design | style sheet
1.CSS Font Shorthand rules
You might do this when you use CSS to define fonts:
Font-size:1em;
Line-height:1.5em;
Font-weight:bold;
Font-style:italic;
Font-variant:small-caps;
Font-family:verdana,serif;
In fact, you can abbreviate these a
css| Tutorial | style sheet
The attributes of an element can also be used for selector. The following list examples illustrate several patterns:
Attribute Selector Patterns
Mode
Description
E[ATTR]
Attribute selector The property selector, matches any e element that contains the attribute, regardless of its value size
First, why do I need to reset the style sheetEven if you do not write CSS styles, HTML tags also have styles in the browser, which are from the browser itself. The problem is that different browsers may have different default styles. CSS resets the style sheet to solve this
css| Skills | tutorials | design | Web page | style sheet
1.CSS Font Shorthand rules
You might do this when you use CSS to define fonts:
Font-size:1em;Line-height:1.5em;Font-weight:bold;Font-style:italic;Font-variant:small-caps;Font-family:verdana,serif;
In fact, you can
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
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
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.