전자상거래 사이트 분류 내비게이션 효과 - CSS 구현 (1) 1 레벨 메뉴

12825 단어
 <title>    title>
    <style>
        *  {  padding: 0px;  margin: 0px;  font-size: 14px;  }
        .menu  {  width: 216px;  margin-left: 100px;  border: 2px solid #E4393C;  }
        .title  {  height: 40px;  line-height: 40px;  background-color: #E4393C;  padding-left: 20px;  }
        .title a  {  color: white;  text-decoration: none;  font-weight:bold;  }
        .title01  {  height: 30px;  line-height: 30px;  padding-left: 10px;
            background: url("images/2.png") no-repeat right center;  z-index:3;  } /*          */
        .title01 a  {  color: #313131;  text-decoration: none;  font-size: 13px;  }
        .title01 a:hover  {  text-decoration: underline;  font-weight:bold;  color: #E4393C;  }
        .title01:hover  {  border: 1px solid #ddd;  border-right: none;
            -webkit-box-shadow: 0 0 8px #ddd;    /*       */
            -moz-box-shadow: 0 0 8px #ddd;
            box-shadow: 0 0 8px #ddd;  }
        .title01:hover .show_menu  {  display: block;  }
        .title01:hover span    {    /*     span           */
            width: 25px;  height: 30px;  background-color: #fff;
            position: relative;  z-index:10;  float: right;  right: -2px;  }
        .show_menu   {  display: none;  position: absolute;  z-index:4;  top: 42px;  left: 318px;
            border: 1px solid #ccc;  width: 715px;  background: #fff;  }
        .left_div  {  width: 400px;  float: left;  margin: 0 5px;  }
        .right_div  {  width: 300px;  float: left;  background-color: greenyellow;  margin: 0 2px;  }
    style>
head>
<body>
    <div class="menu">
        <div class="title"><a href="#">      a>div>
        <div class="title01"><a href="#">  、  、    a><span>span>
            <div class="show_menu">
                <div class="left_div">
                          <br/>
                          <br/>
                div>
                <div class="right_div">
                          <br/>
                          <br/>                
                div>
            div>
        div>

  :
1, div    
2,box-show         
3,span        ,       
4,         position z-index          

좋은 웹페이지 즐겨찾기