Syntax description:
E -- Element
ATT -- attribute
Val -- Attribute Value
E: First-childE: Last-child
Matching the Eelement with the ATT attribute in the documentSyntax: E [ATT]
Matches the Eelement in the document with the ATT attribute and
In a certain area on the webpage, the style is changed when the mouse moves in, and the style is automatically restored when the mouse moves out. It can be the border of an image, or the color of a text segment, it seems that webpage interaction can
When designing a form, we usually add some text prompts. For example, in the search box, we will prompt "enter a keyword ", you can hide and display the focus in a timely manner when you get the focus and lose the focus in the search box. The most
When jQuery is used to obtain the value of background-color in the style, the obtained color value is displayed in HEX format in IE10 or earlier versions [# ffff00], while IE10, chrome and Firefox display [rgb (255, 0, 0)] in GRB format. To
Copy codeThe Code is as follows:
transparent background
Liu Chengliang
Liu Chengliang
Liu Chengliang
Liu Chengliang
Liu Chengliang
Liu Chengliang
Liu Chengliang
Liu Chengliang
Liu Chengliang
Liu Chengliang
display
CSS selectors can include the tag selector, category selector, ID selector, intersection selector, Union selector, descendant selector, global selector, and pseudo class. These style applications have been supported in flex.
1. Tag SelectorThe tag
The page mask pop-up box is the most common case. Today, we use jQuery to implement the page mask pop-up box. The main technologies used include JQuery, css, and html,
The html code is as follows:
Copy codeThe Code is as follows: click here to
A project wants to use jQuery to create a DIV element that can be semi-folded, so it writes it by itself because accordion does not provide relevant methods in jQueryUI. In the past, when using jQueryUI, we found that all the accordion that can be
Copy codeThe Code is as follows:
DIV layer minimization and drag/drop sorting made by JS + CSS
& Lt; table width = "100%" & gt;
Baidu click here to drag - x
address: http://www.baidu.com
keywords:
Note:
& Lt; table
CSS and JS work closely together to add a lot of unique effects to our pages. To achieve some special effect, we need to use Javascript to dynamically change the CSS attribute of a tag.
For example, it is often used to close a floating ad display:
CSS allows you to move the mouse over the image and change the image. This is a result fully implemented by CSS. Of course, JavaScript can also be used. When you move the mouse over the image, the image is automatically replaced with other images,
Code attached:
Copy codeThe Code is as follows:
/* Put the specific module in this big div */
# Contentmenu1 {
Width: 100%;
Clear: both;
Height: 800px;
}
/* Specific module div
Consists of up and down two div
The above div has three rounded
Before starting this article, we will briefly introduce the HTML tag: using the tag, we can define the anchor on the HTML page ), there are two types of anchor usage:
Use the href attribute to create a link (or hyperlink) pointing to another
For example:
Copy codeThe Code is as follows:
However, if the css value is like this:Copy codeThe Code is as follows:
Apparently, the above parseInt () will cause an error, even if it is a value like '. 5', if it is changed to parseFloat (),
Very interesting. Xiao Xie followed the Demo, a useful plug-in, and only jQuery.
Demo page
I. CSS + jQuery: increase or decrease the liquid in the water bottle with the scroll bar:
The website for drinking soda uses pictures of a bottle, which
There are more and more icons in the css style made by the artist. It is almost impossible to manually write the icon name. So we have this function: list all icon classes in the css style and display them in a graphical form for the configuration
Determine whether a layer is hidden:
Copy codeThe Code is as follows: $ ("# id" ).css ("display") = "none ";
Set the value of a style attribute among all matching elements:
Copy codeThe Code is as follows: $ ("p" ).css ("color", "red ");
Set a
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service