css3 menu with inverse rounded corners

后端 未结 1 1860
猫巷女王i
猫巷女王i 2021-01-15 17:05

I designed a navigation menu which looks like the image here:

\"inverse

I want to cod

1条回答
  •  心在旅途
    2021-01-15 17:55

    HTML

    
    

    CSS

    .outer_bg_left, .outer_bg_right {
        float: left;
        width: 70px;
        background-color: #994;
        height: 15px;
        overflow: hidden;
        position: relative;
        z-index: 10;
    }
    
    .outer_bg_left .outer {
        height: 25px;
        border-radius:  0 10px 0 0;
        background-color: #fff;
    }
    
    .outer_bg_right .outer {
        height: 25px;
        border-radius:  10px 0 0 0;
        background-color: #fff;
    }
    
    .outer_bg_left .outer_shadow, .outer_bg_right .outer_shadow {
        box-shadow:  0 0 5px 2px rgba(0,0,0, .7) inset;
        padding-bottom: 10px;
        margin-bottom: -10px;
        height: 25px;
    }
    
    .outer_bg_left .outer_shadow {
        border-radius: 0 10px 0 0;
        padding-left: 30px;
        margin-left: -30px;
    }
    
    .outer_bg_right .outer_shadow {
        border-radius:  10px 0px 0 0;
        padding-right: 30px;
        margin-right: -30px;
    }
    
    .menu_item_cont {
        background-color: #994;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 0 5px 2px rgba(0,0,0, .7);
        background-color: #994;
        display: block;
        float: left;
    }
    
    .menu_item {   
        border-radius: 0 0 10px 10px;
        background-color: #994;
        height: 20px;
        padding: 5px 10px;
    
        font-family: Arial;
        line-height: 20px;
        font-size: 14px;
        font-weight: bold;
    }
    
    .menu_item:hover {
        background-color: #000;
        border-radius: 10px;
        height: 30px;
        line-height: 30px;
        color: #fff;
    }
    

    http://jsfiddle.net/gXQzU/4/

    It's just my first attempt, but I think it looks quite promising.

    0 讨论(0)
提交回复
热议问题