Below is my favorite writing:
The code is as follows
Copy Code
$ (""). attr ({rel: "stylesheet",Type: "Text/css",HREF: "Site.css"}). Appendto ("Head");
Some friends may use the wording below, but there are some
Using JavaScript in the client to detect whether the browser supports a feature feature, although this is the most feasible way, but the bad thing is, for the same feature detection, we need to repeatedly use the same function with various browser
:: The selection pseudo class selector is used for highlighting any part of the page user selection, including text in editable text fields.
This pseudo element can be applied to color, background-color, background (Background-color) and
Difference Analysis
First of all, we all know that Display:none and Visibility:hidden can play the role of hiding elements.
The difference between the two is that the document flow is occupied
Display:none hidden elements while removing the space
Recently browsing online data, found some of their own never used CSS, so recorded, in some cases may be able to use.
1, the simple operation of CSS
We usually use CSS to specify static results, and dynamic results, such as height, location and so
Many people on the Web page to achieve different links have different colors do not know how to deal with, if you change the properties of a, as if all the color of the link changed.
Four hyperlinks in the state of the corresponding CSS properties:
Recently wrote a news page, asked the list at the bottom of the 5px blue border with the scroll bar changes to the specified content, while the bottom of the list with changes in the border, first show you the effect chart style
2. Write
In css, you can change cursor into a hand-capturing shape. Note that it is not the hand of a hyperlink, but the starting point.Css: {cursor: url ('absolute path image (format: cur, ico) '),-moz-zoom-out;} // FFCss: {cursor: url ('absolute path'),
First of all, it is an arbitrary empty tag to use as a small triangle, and the CSS below can be lost: The code is as follows:Copy code . Triangle {Left: 50%;Margin-left:-5px;Width: 5px;Height: 5px;Background: # FAFAFA;Bottom:-4px;Position:
Z-index specification reference• In W3C CSS2.1, each element has a three-dimensional spatial location, except for the horizontal and vertical positions we are familiar, the elements can be stacked on the "Z axis" and arranged forward in sequence;•
Scale down or zoom in to a specific size. For standard browsers (such as Firefox) or the newest Internet Explorer 7 browser,Use the CSS attributes of max-width, max-height, or min-width and min-height. For example: The code is as follows:Copy code
E8/9 (Standard mode) and firefox/safari/chrome/operaIe6/7 and ie8/9 (weird mode)The outer div adds up and down padding 15px, but the padding in ie6/7 and ie8/9 (weird mode) doubles. ie6/7 double padding-bottom bug Ie6/7 double padding-bottom bug
The unit of relative length of pixel (pixel) is relative to the screen resolution of the display (derived from the css tutorial 2.0 manual ).The unit of relative em length is relative to the font size of the text in the current object. For example,
Overflow attribute description:Version: CSS2 compatibility: IE4 + NS6 + inheritance: NoneSyntax: overflow: visible | auto | hidden | scroll The parameters are described as follows:Visible: Do not cut the content or add a scroll bar. If this default
The code is as follows: The code is as follows:Copy code 1 2 3 4 5 6 7 8 9 10 The key to amplification lies in the positioning of elements, position: relative and negative margin. To learn about position:Setting this attribute value
How to insert CSS into a webpageWe have learned the CSS syntax before, but to display the effect in the browser, we need the browser to identify and call it. When the browser reads a style sheet, it must read it in text format. Here we introduce
The DOCTYPE document type is often confusing for new users. In fact, this is only a set of machine-readable plans. Although there is a file URL in the middle, the browser will not read these files, but it is only used for identification. Then decide
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service