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.
I have seen the following selector on Twitter:.show-grid [class*="span"] { background-color: #eee; text-align: center; border-radius: 3px; min-height: 30px; line-height: 30px;}Which children's shoes know this writing.Answer: This is a property wildcard selector. In the example you provide, find any element that contains a span style and set the corresponding style within the container that references the. Show-grid styleIn the following
Class can be used repeatedly on the page,Because the ID can only appear once on the page, it cannot be reused,So try to use the class to write, so that you can repeat the CSS you write in the page to reduce the workload andCodeQuantity.
In this case, try to use ID: in the module with a large page, use ID to distinguish different modules.For example, the page co
And in this so-called appearance of course is to change the properties of its CSS, and the implementation can dynamically change its property value, it is necessary to replace its class attributeThere are three ways to do this:First: Two-way binding via data (not recommended)Second: Through an array of objectsThe third type: by Key/valueHere are the three kinds of simple:The first type: two-way binding via
Modify CSS Property key functions directly: Document.createattribute (' style '): Create attribute node Obj.setattributenode (Attr_node) : Adds the specified property value to the obj element obj.attributes[' style ']: Gets the Style property value of the obj element Obj.setattribute (namestring,valuestring) : Assigns the Namestirng property of the obj element to valuestring
In CSS, the class selector is displayed with a point number:. Center {Text-align:center}In the above example, all HTML elements that have the center class are centered.In the following HTML code, the H1 and P elements all have the center class. This means that both will comply with the rules in the. Center selector.Thi
An element can have multiple class selectors at the same time. Note that when multiple class selectors are conflicting, the last class selector in the CSS file has the highest precedence.
In the following example,,
Cases:
HTML file:
Content of Test.css:
/* An element has multiple
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 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.