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
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",
//modifying a class's property value//JavaScript modefunctionSetcssclassproperty (psheetobj,pclassname,pproperty,pvalue) {varRules =PSheetObj.sheet.cssRules; varrule; varSelectortext; for(i = 0; i ) {Rule=Rules[i]; Selectortext=Rule.selectortext; if(Selectortext = = = "." +pclassname) {Rule.style.setProperty (pproperty,pvalue); } }}Examples of use are as follows:var sheetobj=$ ("#linkSource") [0];Setcssclassproperty (sheetobj, "ClassName", "background", "green");The life of the modifi
CSS in the use of the focus pseudo-class examples of detailed;
CSS: The use of the focus pseudo-class, that is, to set the style for the element that has the focus
Example One
Above through: The Focus gives input box the style setting when the focal point is given
Example Two
: When focus is used in the navigation b
This time to bring you the CSS of the pseudo-class content generation, CSS pseudo-class content generated by the attention of the matter, the following is the actual case, together to see.
1. Add new text (image) content to existing elements via CSSSelector:1,: BeforeIncrease the generated content before matching e
Company recently to do component library, some radio boxes, check boxes, drop-down menus need to be beautiful custom,Idle time makes a component (a high-demand browser) drop-down menu./********* realization Function Start **************/Using CSS pseudo-class: Focus implements the drop-down menu basic functionSelectClick the menu (animation transition) to expand, click again (animation transition) to close;
I used to read an article about ultrashock.
Article , So I wrote a class, which makes it much easier to use.
/*************************************** * ** Cssstyle * References an external style sheet to the component * eg: * var cssstyle: cssstyle = new cssstyle ("style.css"); * apply the style to _ root. mycombox object * cssstyle. applyto (_ root. mycombox, "combox"); * apply the style to all ComboBox objects * cssstyle. applyto (_ global. styles.
Date: 2013-5-26 Source: gbin1.com
Online Demo
Today, we will share another experimental front-end demonstration from the well-known front-end design blog tympanus. These online demonstrations demonstrate the uniqueness of CSS pseudo classes for processing animations and transition effects, I believe that interested friends will feel very interested.
Browser compatibility:
Firefox
Ie10
Latest chrome version
Tip:
These results support v
water, life and work will be as usual.P> H3>----I'm a split line 3----H3> P>Hope that the change of ideas can stay longer: to the people of Heaven, believe in the heartP> H3>----I'm a split line 4----H3> BR/> BR/> BR/> h4>Waterh4> h4>Your eye area must be smaller than the lake.h4> h4>And you seldom cry.h4> h4>Why are you sitting in front of you?h4> h4>It's like standing on the edge of a lakeh4> h4>The th
I don't know if there are any small partners, like me, when I want to add a small icon or something inside an element,Add your own tags directly to the HTML document, or something else. or append an element to the element with JavaScript.For example, we add the b element to the following Div ;$ (function) { $("div").append("}results: and CSS pseudo-class:before;Div:before{content: ""; width:5px;height:5px;left:169px;top:2px;}Note: Content: is an
, Firefox, Opera and other browsers, it is recommended to use a double colon for pseudo-elements, if you have to be compatible with IE browser, or with CSS2 single colon is more secure.All pseudo-elements can be implemented, and real child elements can be done. But sometimes simply for the sake of style and layout to change the HTML structure, this approach is not clean, not worth advocating, so there is a pseudo-element of the market. I used pseudo-elements to draw a printer, unpack half of the
css| Standard | Keywords because of the project to write the document structure, the author of CSS more people, and work with the programmer, you need to unify the name of class and ID, the day before yesterday spent a little time, according to most people's habits, developed the following commonly used keywords:
Container: Container/box
Head: Header
Main navig
This problem occurs when using picture sprites to position images, and sometimes a space can cause a lot of problems, this article introduces the difference between A.class and Class A. (CSS video tutorial)
First Group
Use style one:
a:hover{color:black}a:hover.ico-manage{color:red;}
At this point the mouse is "managed" 2 words, the color is black
Use style two:
A:hover{color:black}a:hover. ico-manag
The following selector is displayed on Twitter:
.show-grid [class*="span"] { background-color: #eee; text-align: center; border-radius: 3px; min-height: 30px; line-height: 30px;}Which of your shoes knows this method.
A: This is an attribute wildcard selector. In the example provided by you, you will find any elements containing the span style in the container that references the. show-grid style and set the corresponding style.
In th
The notation for multi-class selectors. For example:
#my. c1.c2 {color:red;}. c1.c2 {color:red;}
These are supported by browsers such as Ie7+/ff/opera/safari.
In IE6, however, the latter class name overrides the previous class name, that is, the above example is IE6 understood as:
#my. c2 {color:red;}. c2 {color:red;}
Similarly:
#my. c1.c2.c3 {color:red;}I
Tags: that should all be known. elements: the label starts to the end. For example:the content between , the red part is the element. The content of the element: the portion between the beginning and end of the label, the "content between P " in the red section above, which is the content of the element.pseudo-Class: the element that is specific to the state.pseudo-element: The content of the element .Pseudo-elements and pseudo-classes are difficult t
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.