Four ways to add a CSS style sheet to a Web page, you can choose the way you like it.
First, use the Style property: Add the style attribute directly to the individual component label.For example:The advantage of this usage is that it is dexterous to apply styles to each la
css| style Sheet
Now that IE7 has been introduced for some time and has penetrated the user, we can use more advanced CSS on the page without waiting long. The two most useful items will be child and adjacent sibling neighboring sibling selectors. It's time to use them to make Web pages and study them more deeply.
Note
window, before
. Pictures img {filter:alpha (opacity=45);}
. Pictures a:hover img {filter:alpha (opacity=90);}
· If the text is too long, the long section becomes an ellipsis display: IE5, FF is invalid, but can be hidden, IE6 valid
· Title line-wrapping notation or in IE may change the annotation to:Put your commentary ...
· How to invoke external font syntax with CSS: @font-face {font-family:name; Src:url (URL); Srules} value:
Name: Font names.
css| Page | style sheet
1. Tags in mozilla default is padding value, and in IE only margin have a value.
2. The same class selector can appear repeatedly in one document, but only once for the ID selector, and for a label using both class and ID for CSS definition, and if the definition has duplicates, the ID selector
Just learn Laravel, met a lot of pits, feel laravel is quite powerful.Build a background project, but the CSS style sheet background image does not display{ background: url (.. /images/sky/body_bg.png) repeat-x 0px 0px;}Supposedly the above is written correctly, because it is moved from another background, but the picture has not been shown, access to the abso
> Div>Body>The remaining code styles do not changeAdd an empty div, use CSS to improve the clear:both to clear the float, so that the parent div can automatically get to the height, but this method if the page floating layout more, it is necessary to add a lot of empty Div, will make the HTML code very complex. Recommended for simple page use.4, Pseudo-class clear floating:Add the following styles:. clearfloat:after{ Display:block; Clear:both
, this ID selector can be used many times as a derived selector:
#sidebar p { font-style: italic; text-align: right; margin-top: 0.5em; }#sidebar h2 { font-size: 1em; font-weight: normal; font-style: italic; margin: 0; line-height: 1.5; text-align: right; }
Here, unlike other P elements on the page, the P elements in the sidebar get special processing, and, unlike all other
css| style Sheet
There will be additions or modifications to the content over time, and it is hoped that the following things will be helpful or useless to the later standard learners.
The main content is the difference between IE and Mozilla and easy to ignore details, some classic application of the best implementation method, should avoid violating the error.
1.cursor:pointer Mouse on the top to change shape, pointer for the hand2.margin:auto Page Center3. Display mode: Dispaly:none does not show/block block line wrapping/inline on one line, width and height are not available/inline-block on one line, you can set width and height do not display or occupy the place4.visibility: Visibility, hidden hidden, visible display. Not show but Occupy place5. Hyperlinks:A:link effects that have not been visited{Text-decoration:none;Color}A:visited visited effect
Frog recommended: demonstrate CSS style sheet priority
It can be seen that the effectiveness of the label style is the lowest, followed by the pseudo class defined,
The next step is to add a pseudo class with a redefinition tag (similar to h2.myclass {color: Blue}). The highest level is the
1 Refactoring and Architecture:Refactoring: Refactoring is the rewriting of code without changing the behavior of the codeSoftware Architecture: Excellent architecture improves code reuseWhy refactoring is neededUnder what circumstances should the code be refactored?Can I refactor my own code?The refactoring example.2 CascadeWhat is? Selectors are specifically3 Writing higher-quality CSSUsing annotationsStructure-consistent Rules tableKeep the selector simpleSeparating
bars regardless of whether the content exceeds the layer sizeAuto Add scroll bar when auto exceeds1.4 Compatibility issues and efficient development tools1.4.1 Compatibility Test ToolIE TesterMultibrowser1.4.2 commonly used browsersFirefoxGoogle ChromeOpera1.4.3 Efficient Development tools1.4.3.1 Light Classnotepad++Sbulime TextNotepad to choose according to your needs1.4.3.2 Heavy-weightWebstormDreamweaver 1.4.4 Web Design ToolsFireworksPhotoshop1.5 ways to judge IE conditional co
css| Difference | The difference between a style sheet SPAN and a div is that Div (division) is a block-level element that can contain paragraphs, headings, tables, and even chapters, summaries, and notes. span is an inline element, the span is not wrapped around, it has no structural meaning, is purely applied style,
css| style Sheet
*{margin:0;padding:0 at the beginning, you need to restore the HTML default CSS value when you need to use margins.
I've been looking for this document, and I happened to see it on W3 today. In addition to the definition of inline and block, it is important to note
Default styles for labels such as BOD
Web page Production WEBJX article introduction: CSS style sheet video tutorial: What is a media query.
Media Queries are one of the most exciting aspects of today's CSS styles. It allows us to accurately adapt to the layout of various devices without changing the content of the page. The following descriptio
Css| Capital | special Effects | web | page Effects | style sheet
There are many attributes that are rarely used in CSS, but these properties are sometimes discovered and immediately cause some people to chase them, which is the result of the first word capitalization. Recently more and more bloggers began to use this
Yesterday I met a colleague asking a question, @impor what is the priority of importing an external style to link to an external style, and why the result of the experiment is to determine the priority based on the position of the style sheet when it was imported. Today on this issue, degrees Niang looked for a long ti
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.