Ul li sets the horizontal bar and removes the dot before li, ulli

Source: Internet
Author: User

Ul li sets the horizontal bar and removes the dot before li, ulli

Effect preview: http://hovertree.com/texiao/css/

How to Use CSS to make horizontal menus for ul li horizontal arrangement and dot Processing

We first create an unordered list to create a menu structure. The code is:

<Ul> <li> <a href = "http://hovertree.com/"> Home </a> </li> <a href = "http://hovertree.com/map/"> website Map </> </li> <a href = "http://hovertree.com/menu/hovertreecms/"> HoverTreeCMS </a> </li> <a href = "http://hovertree.com/menu/texiao/"> special effects </> </li> <a href = "http://cms.hovertree.com/"> CMS Online Preview </a> </li> <a href = "http://hovertree.com/hvtart/bjae/74cc61ed089a2991.htm"> jQuery image list show text with the Mouse mask </a> </li> <a href = "http://hovertree.com/hvtart/bjae/rtmloulp.htm"> original </a> </li> </ul>

Effect:

    • Homepage
    • Website Map
    • HoverTreeCMS
    • Special effects
    • CMS Online Preview
    • JQuery image list show text with a mouse mask
    • Original

Step 2: Hide the default li style and remove the dot
Because it does not look very nice, the menu usually does not need the default dot li, we define a style for UL to eliminate these dots.

Of course, to better control the entire menu, we put the menu in a div. The page code is changed:

<Style>. hvtulli22 ul {list-style: none ;} </style> <div class = "hvtulli22"> <ul> <li> <a href = "http://hovertree.com/"> Home </a> </li> <a href = "http://hovertree.com/map/"> website Map </a> </li> <a href = "http://hovertree.com/menu/hovertreecms/"> HoverTreeCMS </a> </li> <li> <a href = "http://hovertree.com/menu/texiao/"> special effects </a> </li> <a href = "http://cms.hovertree.com/"> CMS Online Preview </a> </li> <li> <a href = "http://hovertree.com/hvtart/bjae/74cc61ed089a2991.htm"> jQuery image list move the mouse over the masked text </a> </li> <a href = "http://hovertree.com/hvtart/bjae/rtmloulp.htm"> original </a> </li> </ul> </div>

CSS is defined:

. Hvtulli22 ul {list-style: none ;}
Note: ". hvtulli22 ul" indicates that the style I want to define will apply to ul labels in the hvtulli layer.

Now the effect is no dot:

Homepage

Website Map

HoverTreeCMS

Special effects

CMS Online Preview

JQuery image list show text with a mouse mask

Original

 

Step 3: Key fluctuations
Here is the key to changing the menu to landscape. we add a "float: left;" attribute to the li element to let each li float on the left of the previous li, margin-left: 10px: The interval between li is 10 pixels.

CSS is defined:

. Hvtulli li {float: left; margin-left: 10px}
Effect: http://hovertree.com/texiao/css/

Check that the menu is changed horizontally. That's easy! The following is the optimization details.

HTML file code:

<! DOCTYPE html> 

Javascript, jquery, css, html5 special effects http://www.cnblogs.com/roucheng/p/texiao.html

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.