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
Unordered listAn unordered list is a list of items that are marked with a bold dot (typically a small black circle).The unordered list starts with the
Ordered listSimilarly, a sequence table is a list of items that are marked with numbers.The sequence list starts with the
Definition ListA custom list is not just a column of items, but a combination of items and their annotations.The custom list starts with the
Different types of ordered listsThis example shows the different types of
HTML unordered table, it is recommended to use styles to define the type of the list.Usually paired with LiOptional properties:Type:disc Dots, Circle circles, square squaresCompact: Smaller display effect than normal"circle" compact="compact" > : The UL tag of HTML
Li Wu:Heng Learn to think together, honouring teachers save Thanksgiving. Leaf See root three return to one, rivers the same oneness.Meekness Conscience Lord, willing to do without regrets to the most bitter. Reading exercises to keep the body and mind, sincere advice and the line and cherish.
Ide:visual Studio 2017
Browser:chrome/firefox
Os:win7
Code EffectExtendedInstead focusing: When the unordered list is nested, it is a static effect that can be combined with JavaScript t
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.