This article is an example of how jquery displays a certain Li index number in ul. Share to everyone for your reference. The specific analysis is as follows:
This code not only applies to the UL and Li element index number lookup, but also applies to other with the inclusion of the element index number lookup, the method is very clever
$ ("ul > Li"). Click
Css
A few CSS elements of the simple explanation div ul DL DT Oldiv, this is very common, block-level elements, div as little as possible, and table, nesting less the better
OL have sequence table.
The performance is:
1. ...2. ...3. ...
UL unordered list, showing that the front of the Li is a circle dot instead of 123
Many people easily ignore the use of DL DT DD
DL Content BlockThe caption of the
DemoLi Properties:1. Type:AAII1DiscSquareCircleNote: The general type attribute is defined in the CSS on the UL or OL element above, Li tag does not do processing. Ol property:1.reversed: Specifies that the list order is descending2.start: Specify the starting value of the ordered list3.type:1AAIIUL Properties:1.reversed: Specifies that the list order is descending2.start: Specify the starting value of the ordered list3.type:DiscSquareCircleHTML Serie
The method for displaying and hiding ul lists in Javascript is javascriptul.
This article describes how to display and hide ul lists in Javascript. Share it with you for your reference. The details are as follows:
I hope this article will help you design javascript programs.
ul+li and CSS make Korean style menu code _ Experience Exchange
South Korea's Web site is characterized by distinctive design, bright colors, and now more and more people are imitating this style.Korean style web site design ideas are loved by everyone, because of its rich color changes, Korean-style website has one of the most obvious feature is the table or the title bar often add a horizontal or vertical ribbon. We usually used image image softwa
This article mainly introduces how to use javascript to operate li in ul, which enables the function of changing the background color with the mouse passing through the li tag item. It involves operations related to javascript mouse events and page element attributes, for more information about how to use javascript to operate li in ul, see the following example. Share it with you for your reference. The de
JS Dynamic Add Delete ul node Li 1. Page effects Click Add, you can add text box, click Remove delete text box 2.jsp file Jsp 3.js Js JS Dynamic Add Delete ul node Li
. Four {width:336px;height:200px;Background: #eee;Float:left;margin:5px;}. Four img {height:120px;Float:left;margin-left:10px;padding:6px;Background:darkgray;}. Four UL {Float:left;}. Four Li {Background:url (./images/black.png) center left No-repeat;height:15px;margin:10px;background-size:3px;padding-left:10px;font:12px/15px "Blackbody";}. Four a {}. Four a:visited {Color:gray;}. Four H2 {margin:6px 0 6px 10px;font-size:16px;}#art {Background: #EEE;m
Block-level element div as little as possible, in fact, as with table, the less nested the better, it will affect the speed!OL has a sequence table.Performance as:1 ...2 ...3 ...UL unordered list, shown as Li Front is a big circle dot instead of 123Multi-person easy to ignore DL DT DD usageDL Content BlockThe title of the DT content blockDD ContentTo write like this:Ol,li,ul,dl,dt,dd
Function Showall (menu_list, parent ){
12
For (
VaR Menu
In Menu_list ){
13
//
If a subnode exists, the subnode is traversed.
14
If (Menu_list [menu]. menulist. length> 0 ){
15
//
Create a subnode Li
16
VaR Li = $ ("
17
//
Set the Li text, add a blank ul subnode immediately, and add this Li to the Father's Day node.
18
$ (LI). append (menu_list [menu]. mname). append ("
19
//
Pass the bl
Div ID = "Divcityframe" > Span Onmouseover = "Showdivcity ();" Onmouseout = "Hiddendivcity ();" > A Href = "Javascript: void (0 )" > Show City A > Span > Div ID = "Divcity" Onmouseover = "Showdivcity ();" Onmouseout = "Hiddendivcity ();" > Ul > Li > A Href = "11" > A A > Li > Li > B Li > Li > C Li > Li > D Li >
ExampleCode:
Composition
The following figure shows the effect:
The content in ol will appear on the right side of P, but the entire ol block is actually the same in the figure. Left is on the left side of the page rather than the right side of the P element before it, in this case, the margin of P is invalid for ol, so we can see that the sequence numbers of ol are blocked.
At this time, we can add float: left to ol. However, in most cases, this float should not have been added,
Use JavaScript to obtain the number of li in ul.
This example describes how to use JavaScript to obtain the number of li in ul. We will share this with you for your reference. The details are as follows:
There is such an HTML code:
The number of
You can combine getElementById and getElementsByTagName to achieve the following:
Temp = document. getElementById ('my‑usel'); lis = temp. getElementsByTagN
The HTML list is divided into sequential tables, unordered lists, and descriptions. We often use a sequence list (OL) with an unordered list (UL).
Ordered list
Type attribute: Implements ordered sorting in different ways, deprecated, and usually replaces it with a style.(1) 1 indicates the sort in 1,2,3,4 numeric form.(2) A means sorting in a,b,c,d lowercase letters.(3) A means sorting in a,b,c,d capitals.(4) I denotes the sort in lowercase by
UL Li background Small icon property settings generally have two kinds of situation: the definition in the UL and Li, these two definitions in what circumstances use, in the following gives a detailed introduction, often div+css layout of friends may wish to refer to, I hope to help
here we are listed in two ways:① when the icon before the title is a long strand rather than a single point or similar icon,
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.