Base.jsvar $=function ()//Call{return new Base ();};//Object typefunction Base (){ //Create an array to get an array of nodes and nodesthis.elements=[];//privatization, not shared }//Get ID nodebase.prototype.getid=function (ID){This.elements.push (document.getElementById (ID));return this;};//Get element nodebase.prototype.gettagname=function (TAG){var tags=document.getelementsbytagname (tag);For (var i=0;i {This.elements.push (Tags[i]); }return this;};//
Core tips: Class can be reused and IDs can only be used once in a page. It is possible that using the same ID repeatedly in a large number of browsers will not cause problems, but it is definitely wrong to use on the standard and is likely to lead to some real-world problems with browsers.
Class can be reused and IDs can only be used once in a page. It is possible that using the same ID repeatedly in a lar
: First-child
Add a style to the first child element of an element
: lang
Add a style to an element with the specified Lang property
Note: In the CSS definition, the same element: hover must be located in: Link,: Visited before it takes effect: active must be in: hover before it takes effect.CSS pseudo-elements (pseudo-elements): Used to set special effects to certain selectors, is to set and manipul
pseudo-classes can only be so? Why is this order?It is important to have a rule in the CSS cascade, which is to overwrite the front, so the order of the pseudo-class needs to be carefully considered."1" link and visited must be in the front, and there is no order, otherwise the effect of link or visited will be overwritten[Note that]link and visited are called static pseudo-classes and can only be applied
, so it is a pseudo element that has been preceded by a two colon in the CSS3 selector. Please see: w3cselect
Here's the problem, so why do we usually use before and a colon before?
When you look at the CSS2 selector, you know, in the old specification, the pseudo class and pseudo element all use a colon, the new specification in order to differentiate, the pseudo element unifies uses two "::", therefore, everybody notices, later writes the CSS3, fo
1. Pseudo-Class selectorsIn CSS, the most commonly used pseudo-class selectors are several selectors that are used on a (anchor) element, and they are used in the following ways:A:link{color: #FF0000; Text-decoration:none}A:visited{color: #FF0000; Text-decoration:none}A:hover{color: #FF0000; Text-decoration:none}A:active{color: #FF0000; Text-decoration:none}2. Ps
Dynamic dynamically change the class and dynamically_layout of the css label of the master _ Layout page body
This function is a function recently implemented by Insus. NET. It is a class that dynamically changes the style css of the master _ Layout page body tag in dynamically.Many views share a master _ Layout page,
JS is often used to dynamically set CSS classes, two methods.1, ClassNameClassName is a string that contains all classes, so adding a delete class is just as good as manipulating a string.Adding classes is simple and straightforwardObj.classname + = ' active ';Remember to add a space.To remove a class, you need to use the string replace function.Obj.className.rep
Recently saw some of the pseudo-class articles and examples, feeling not impressed, today in the project has an effect, write down toThere is a horizontal line in the text two times.1. Page Local Area layoutdiv->span-> kanji (Small type)The class is quote-right on 2.span 3 add its corresponding pseudo-class in CSS.
CSS pseudo-class: Control the state of an elementSyntax: element name: Pseudo-class Name {attribute: value}CSS pseudo-class controls link state
State
Grammar
Non-visited links
A:link{color: #ff00ff}
Links that have bee
This article mainly introduces the CSS Update class implemented by php and its usage examples, including functions such as checking template files, updating and replacing template files, which are very practical, for more information, see the examples in this article to describe the CSS Update class implemented by php
;Collectiona>Li>Li>ahref="">Drafta>Li>Liclass= "Last">ahref="">Projecta>Li>ul>To achieve this, we can use a composite selector in CSS .ChooseLabelYou can use a selector to define all the elements, as follows:. Nav Li a {} Select the first elementTo increase the fillet effect in the upper-left corner of the list, you need to select the first element. This can be done with the following selector:. Nav Li.first a {} Select the last elementTo increa
: hover--css:hover pseudo class, applies to the cursor (mouse pointer) pointing to an element, but the style when this element is not activated
Grammar::hover
CSS version: CSS2
Citation URL: http://www.dreamdu.com/css/pseudo-class_hover/
Description
Applies to a cursor (mouse pointer) that points to an element, but when this eleme
left side of the gutter, only for @page rules
: Right
Defines the style used by all pages on the right side of the gutter, only for @page rules
: lang
Defines the content style of an object using a special language
Pseudo-Object
Description
: After
Used with the content property to define what is behind the object
: Before
Used with the content property to define what is in front of
Recent projects to write their own front-end, re-learn the basics of the front-end.Generally in CSS style sheets, the above will be overwritten by the following, for example, the text will show Blue:So according to normal, the following CSS style, the test text should still be blueBut as a result, the test text is shown in yellow, the result of the tag Selector is overridden by the property selector, and th
Link pseudo-class (: hover) CSS background image flashing bug
This problem is often encountered during development. Here, we make a record for the emergency.
The link pseudo-class (: hover) CSS background image under IE6 has a flash bug, mainly because IE will request this image again, or the image is n
Problem Description:Web page Click the "Export" button, save the page table content into an Excel file, but found that the table style cannot be saved Analysis Process:The 1.table table uses class instead of style. The class definition is not exported and the style is exported by writing the color style directly in the style if you change to a style.Style is a pattern, which is used in HTML to mark the attr
A class is used to define one or more elements according to user-defined standards. For example, a script: A class can define the story line of each character in the script. You can use this class through CSS and JavaScript. Therefore, you can use class = "Frodo",
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.