How to give transparent hexagon angle at the last

2019-07-19 15:13发布

I have to make menu like this. alt text http://shup.com/Shup/330421/1104422739-My-Desktop.png

  • Items of drop-down can be increased and decreased If client will add or remove pages.
  • width of drop-down's will depend on how many character in page title name.
  • angle only needed at last item's right bottom corner.

I Know how to make drop-down menu and how to give cross browser transparency , but I want to know How to give needed angle to right bottom angle while keeping transparency.

4条回答
Explosion°爆炸
2楼-- · 2019-07-19 15:21

Using HTML 5

<nav>
<ul>
<li><a href="">Item 1</a></li>
<li><a href="">Item 2</a></li>
<li><a href="">Item 3</a>
    <ul>
    <li>Item 3.1</li>
    <li>Item 3.2</li>
    <li>Item 3.3</li>
    <li>Item 3.4</li>
    </ul>
</li>
<li>etc......
</ul>
</nav>

css

border-bottom-right-image:

查看更多
戒情不戒烟
3楼-- · 2019-07-19 15:42

you can change the opacity of the elements with CSS, this will work with all major browsers:

.transparent_class {
    filter:alpha(opacity=50);
    -moz-opacity:0.5;
    -khtml-opacity: 0.5;
    opacity: 0.5;
}

you need to do this using lists, you can apply a special class to the last li to make it look different. this jquery line might help you

$("#item3 li:last").addClass("special_corner");

UPDATE:

why dont you take alook at JQuery Corner Demo

查看更多
三岁会撩人
4楼-- · 2019-07-19 15:43

Check out Son of Suckerfish drop down menus. The special styling you want would require a class to be assigned to the last <li> in any <ul>

查看更多
叼着烟拽天下
5楼-- · 2019-07-19 15:44

Using the jQuery corner demo:

$("#item3 li:last").corner("br bevel");
查看更多
登录 后发表回答