1. Use class_name to write the class name.I used to like writing with class-name, but it seems that there is no difference between the two. However, I am opposed to writing class names using className because I have always been skeptical about Browser case sensitivity. However, I will write the id as a camper. For the reason, see the next one.
2. Style uses
First, write the class name in Class_name way.
I used to like to write with Class-name, but it seems that there is no difference between the two. But I'm more opposed to writing class names with ClassName because I'm always skeptical of browser-sensitive issues. But ID I'll write hump style, for the next one.
Second, the style is used
The native JS method "Document.getelementsbyclassname" is not available in IE8 and the following browsers, so it writes a method compatible with IE.The full page code is as follows:Testjsgetcssclass.htmlhtml>head>style type="Text/css">. Test_class_div {font-size : 14 px ; border : 1 px Solid #ccc ; margin : px ; padding : 5 px ; font-weight : bold ; color : red ; Span class= "Hljs-ru
Because the environment to compress js,css offline, it is impossible to use the online compression function of the network,
So I want to find a PHP class to compress JS or CSS,
GitHub did not find particularly good, so want to ask everyone, hope to recommend, thank you!
Reply content:
Because the environment to compress js,
know. the Content property of the CSS is specifically applied to the before/after pseudo-element, which is used to insert the generated content. The most common application is to use pseudo-classes to clear floats.. clearfix:after { content: ".";//the content attribute Display:block is used here ; height:0; Visibility:hidden; Clear:both; }.clearfix { *zoom:1;}After pseudo-elements generate block-level elements of a point after the
Css id selector and CLASS selectorIn CSS, a selector is a pattern used to select elements that require adding styles.The attribute selector can select an element based on its attributes and attribute values.
Three basic selector types: Tag name selector, class selector, and ID Selector
The syntax is as follows:
1. Tag
Before writing a "detailed CSS properties-: Before : After" blog, then I did not distinguish between pseudo-elements and pseudo-class, so in the article to confuse the concept, fortunately @riophae brother corrected my mistake, so today intends to study the difference between the two.First, read the w3c definition of both:
CSSPseudo-classes are used to add special effects to certain selectors.
CSSPseu
Difference between css style and class, cssclass
Problem description:
After clicking the export button on the webpage, the table content on the page is saved as an excel file, but the table style cannot be saved.
Analysis process:
1. Use a class instead of a style in a table. The class definition is not exported
Class SelectorIn CSS, the class selector is displayed with a point number:
Copy Code code as follows:
. 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
(1). Link pseudo-Class useA: link {color:pink;}-----not clickedA: visited{color:skyblue;} -----already clicked on the linkA: hover{color:red;} -----The color change of the mouse move a: active{color:black;} ----The color change of the selected linkTips:In the CSS definition, a:hover must be placed after A:link and a:visited to be validIn the CSS definition, a:act
The code is as follows
Copy Code
Example of upper area, let's introduce the following
The code is as follows
Copy Code
CSS part
The code is as follows
Copy Code
/*css part, pay attention to the value of border, margin, left and right.#nav_demo {Margin-top:20px;margin-left:20px;font-size:12px;font-family:micro
One of the main advantages of CSS is that it makes it easy to apply a set of styles to all the same types of elements. Of course it is done by selectors.Basic rule structure:syntax = selector + declaration block1. Element selector--use HTML element name directly, point to document ElementUsing the element selector is the best choice if you want to add indentation to all paragraphs.p{ Text-indent:2em; }2. class
ID is different, it must be worn out. The principle I have summed up through practice is that IDs need to be unique and used as much as possible on the periphery. Class is repeatable and is used within the structure as much as possible. The benefit of this is that it helps to maintain and modify the site code later, so that all classes become children of IDs or grandchildren.
You can have two sons, but you can have two dads, that's the truth. When we
The basic selector and the attribute selector in CSS and the pseudo-class selector are summarized, but the pseudo-class is the corresponding pseudo-element.So,,, what are the secrets of what they can't say? NextClassify the two firstTypes of pseudo-classes:Types of pseudo-elements:How to use both:css3to differentiate between the two, the pseudo-
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
I have made a convention by myself. Some colleagues said they thought they could, so I also sent it to you.
Http://blog.510769.com/CY_Files/1680/EuCls.Css.3.0.zip/* @ charset "UTF-8"; * // * sets the document mode, default is not enabled, generally solve the problem of Chinese compatibility, at the same time pay attention to the file storage encoding format to be unified */
/*
Eucls. CSS
The purpose of writing this
In the CSS beginner's tutorial we only consider HTML selectors--appearing as HTML tags.You can, of course, define your own selectors with the class selector class and the identity selector ID.The advantage of doing this is that depending on the class or ID, you can perform the same HTML element differently.In
Recognize the class and id selector of CSSIn the CSS Elementary tutorial, we only consider the HTML selector-in the form of HTML tags. Of course, you can use the class selector and the identifier selector id to define your own selector. The benefit of doing so is that depending on the class or id, you can behave the sa
css| Tutorials | Getting started This is the first day of the last half month, around 20:00 to work, thinking about this tutorial has not been completed, the feeling is very not practical. Just resigned two months ago, would like to complete the tutorial, but due to a misfortune, resulting in the hard disk of the majority of the data lost, the half of the tutorial has been written in the Ashes. But recently a lot of netizens through the blog, QQ, MSN,
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.