placeholder of element E. Because it is not a specification, you need to add a browser vendor prefix, specifically as follows/*for old version of ff*/input:-moz-input-placeholder{}input:-ms-input-placeholder{}/*for modern browsers*/input::- webkit-input-placeholder{}input::-moz-input-placeholder{}And only the following properties are available: color, font-size, Font-style, Font-weight, letter-spacing, line-height, padding, text-align, Text-decoration.Attention:/* Because the pseudo-element
:
results The data in the:CSS Priority rule:A selector has a weighted value, the greater the weight the higher the priority;B when the authority value is equal, the style sheet setting appears better than the style sheet setting that appears first;C C
CSS SelectorCSS selectors are most commonly used as class selectors, defined in the following way.DOCTYPE HTML>HTMLLang= "en">Head> MetaCharSet= "UTF-8"> title>CSS Selectortitle> style>. C1{Height:48px;width:Auto;Border:1px solid Red;font-size:16px;text-align:Center;Line-height:48px; } style>Head>Body>Divclass= "C1">Style testDiv>Body>HTML>After the class
the bottom text(14) When the mouse moves to the top, display the promptsuch as code: title= " can enter decimal ">Effect:(HTML) Tag mapNote: This image is intercepted from NetEase Cloud class.(16) Set text to center verticallyThe easy way to do this is: in CSS properties, setLine-height:xx px;Where the XX, the value and the height of this div block is the same.(17) Picker Finishing
Selector
Add a class to a P label, but some attributes in the class do not work after execution. The firebug check shows that the property that does not work is overwritten. At this time, I suddenly realized the priority issue of the CSS selector. Here I will summarize the priority issue of the CSS selector.
51cto recommended
This article mainly introduces the selection of CSS in the summary and efficiency comparison, including pseudo-class selectors and pseudo-element selectors, the need for friends can refer to the following
As we all know, CSS is additive (the same element is specified by multiple style rules), inheritance (descendant elements inherit some of the styles and attributes of the predecessor Element) and preceden
with a dot
The naming conventions for class names are the same as the naming conventions for ID names
The class name is the one that is designed to set the style for CSS.
Each label in HTML can be bound to multiple class names at the same timeFormat:
ID selector and class selector
What is the difference between ID and class?
Different browsers (ie, Gecko, opera...) have different rendering methods for CSS, resulting in different display effects,Therefore, we can solve this problem by loading different CSS. The following describes the two methods,It is not necessarily very practical and difficult to play. Code in pure CSS Mode
. Box {width: 20em; Height: 20em; Background: #369;}/* --
stay; +background-color:pink; + IE7 fixed; _background-color:orange; _ Dedicated to the magical ie6;: root #test {background-color:purple\9;}: Root is for IE9, a version of the Internet has been circulated: root #test {background-color:purple\0;}, Uh... This one... , the new opera is also known, so the author repeatedly verifies that the final IE9 is: root selector {attribute \9;} @media all and (min-width:0px) {#test {background-color:black\0;}} Thi
ArticleDirectory
Modifier Selector
However
More efficient CSS selectors
Efficient CSS is no longer a new topic, nor a topic that I have to repeat, but it is a topic that I have always followed after working at Sky.
Many people forget or just don't realize that CSS can be efficient or possibly le
This article is mainly used to store CSS and CSS3 of the selector part of the Knowledge for future review and memory.The content is divided into two parts, the first part is the CSS selector of some basic knowledge. The second part is the new CSS3 added selector.Before we get started, let's start with a brief introduct
As a web developer, it is also important to have the necessary foreground technology, especially when encountering some practical problems. Here's an example: Adds a class to a P tag, but some properties in that class do not work after execution. The Firebug view shows that the properties that are not working are overwritten. This time suddenly aware of the CSS selector priority problem, here on the
CSS three major features--inheritance, precedence, and cascading. Inheritance: the child class element inherits the style of the parent class;priority: refers to the weight comparison of different categories of styles;Cascade: is the style of stacking (the latter covering the former) when the quantity is the same.CSS Selector categoriesFirst look at what CSS sele
1DOCTYPE HTML>HTMLLang= "en">Head> MetaCharSet= "UTF-8"> title>Titletitle> style>[Id*=div]{Color:Lime; } /*^ First character*/[Id^=div]{Color:Darkblue; } /*$ end Character*/[Id$=ym]{Color:Crimson; } style>Head>Body>DivID= "Mydiv1">Example Text 1Div>DivID= "Div2">Example Text 2Div>DivID= "Div3">Example Text 3Div>DivID= "Div4">Example Text 4Div>DivID= "my">Example Text 5Div>Body>HTML>2:ui Pseudo class SelectorDOCTYPE HTML>HTMLLang= "en">Head> MetaC
Reprint website:http://polaris1119.javaeye.com/blog/764428This article summarizes the priority of CSS selectors, strictly speaking, there are three kinds of selectors: Tag name selector, class selector and ID selector.As a web developer, it is also important to have the necessary foreground technology, especially when you encounter some practical problems. Here i
CSS three major features--inheritance, precedence, and cascading. Inheritance: the child class element inherits the style of the parent class;priority: refers to the weight comparison of different categories of styles;Cascade: is the style of stacking (the latter covering the former) when the quantity is the same.CSS Selector categoriesFirst look at what CSS sele
What is CSS Selector?CSS selector positioning is actually the HTML CSS selector tag positioningToolsCSS selector can be downloaded using Firefox plugins, Firefinder or Firebug and firep
CSS selector is just a function of jquery, let me give you a detailed introduction to the jquery CSS () selector using methods and instructions, there is a need to understand the students can refer to the study.CSS operations have an important approach: CSS ()
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.