0 reply content: @ Ding XiaoYu's statement is a bit extreme.
The element is the block content, that is, the elements generated by the document outline (outline. It only reflects its content including navigation, but does not express its content form. The navigation content can be a list of links or a natural text embedded with navigation links.
By W3C
Description of an element (http://dev.w3.org/html5/spec/the-nav-element.html#the-nav-element
:
CSS style sheet code:HTML Layout Code::HTML Layout section, you can add the corresponding div according to your needs.1. CSS Key Style word explanation1), ul.imglist{margin:0 auto; width:536px; Overflow:hidden}Using margin:0 Auto, let the UL structure Layout Center;Use Overflow:hidden because the children of UL use the Float property to produce floats, so using the clear child with float does not create a p
. unknow_width_center2 {text-align:center; padding:5px;}. unknow_width_center2 li {display:inline;}Set the child element to inline center, then we all know that the Display:inline inline element width is not set, the limitations are too large, not suitable for use.Scenario three, using the property properties of table. unknow_width_center3{margin:0 Auto}. unknow_width_center3 ul {overflow:hidden; *zoom:1}. Unknow_width_center3
Ul labels are often used by us, but since I am used to using IE, I do not care about the effect of running it in other browsers, after Firefox is recommended by others, ul is not compatible with IE and Firefox. ul has a padding value in Firefox, but not in IE, on the contrary, there is a margin value in IE, but it does not exist in Firefox. We can use the followi
Today because I have to use to write a JS to get the UL div all Li tags, the first is to get the specified ID under all the Li title, and then use length to get the length of the array, and then for one by one to traverse the innerHTML value of Li.
If it is to obtain the UL below the LI to use the following code
var tree1 = document.getElementsByTagName ("
This article mainly shares with you the specific implementation steps and code of the jqueryul simulated list menu. If you are interested, please refer to the following:
The Code is as follows:
Jquery uses ul to simulate the select list menu Effect
After the above Code is put into the html body, the following code will appear: this is point test. (the effect of adding a dot before)
But sometimes you want to see this effect directly without using the UL Li tag (for example, the lable effect in GWT ). You can use the following alternative method:
1. Enter the Chinese Punctuation "·". The location is usually at the bottom of the ESC (exit) key, that is, "~" This key
2. Use the entity character "
Source: http://lnzengjie.blog.163.com/blog/static/23620162201041224238965/
Solution:
1. Write float: left in UL's style to make ul float;
2. Write width: 100%; overflow: hidden; In UL's style;
Complete style and HTML are shown in the following example,
1$ (function () {var all = $ (". Test"), $ (". Test"). each (function () {var y = $ (this). Children (); $.each (Y,function (Key,value) {Console.log (value.innerhtml)//Gets the text value if (Value.getattribute ("Data-url"). IndexOf ("1")!=-1) {//Get Properties of Li Value.style.display= "None"//Set Li's Style})})2 Action-known elements of the UL
function Appendli (obj) { var newli=document.createelement (' Li '); newli.style.margintop= "10px"; Newli.innerhtml= " Add a new Li to a UL, add a text box to Li, and delete the action
I encountered a problem in the project today.OlAnd set list-style in CSS not to none, but the serial number is not always displayed. Of course, at first I thought that CSS style cascade was overwritten, but I used the final artifact:Ol {list-style-type: decimal! Important ;}The problem still persists. I know I should consider other reasons.It is rare that answers are not found in Google for the first time.As a result, a new page is created and found in reset.css.Body, Div,
JavaScript provides the innerHTML property to get and set the text content of an object.The following example shows--click the 1. HTML structure2. JavaScript codeWindow.onload = function () {obj = document.getElementById ("Test"). getElementsByTagName ("Li");for (i in obj) {Obj[i].onclick = function () {str = this.innerhtml;this.innerhtml = "clicked" + str;}}}3. Effect DemonstrationJS A small example of modifying UL
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.