带箭头的CSS菜单

时间:2017-05-12 08:52:42

标签: jquery css3 twitter-bootstrap-3 pure-css

a:hover,a:focus{
    text-decoration: none;
    outline: none;
}
.tab .nav-tabs{
    border-bottom: 2px solid #ddd;
}
.tab .nav-tabs li{
    margin: 0 2px 0 0;
    position: relative;
}
.tab .nav-tabs li.active:before{
    content: "";
    position: absolute;
    bottom: -28px;
    left: 68px;
    border: 14px solid transparent;
    border-top-color: red;
}
.tab .nav-tabs li.active:after{
    content: "";
    position: absolute;
    bottom: -24px;
    left: 81px;
    border: 12px solid transparent;
    /*border-top-color: #fff;*/
}
.tab .nav-tabs li a{
    border: none;
    padding: 20px 53px;
    font-size: 14px;
    color: #777;
    background: transparent;
    border-radius: 0;
    text-decoration: none;
}
/* .tab .nav-tabs li a:hover{
    color: red;
} */
.tab .nav-tabs li a i{
    display: block;
    text-align: center;
    margin-bottom: 5px;
}
.tab .nav-tabs li.active a,
.tab .nav-tabs li.active a:focus,
.tab .nav-tabs li.active a:hover{
    border: none;
    background: transparent;
    color: red;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.20s linear 0s;
}
.tab .tab-content{
    font-size: 14px;
    color: #777;
    background: #fff;
    line-height: 25px;
    padding: 10px;
}
.tab .tab-content h3{
    font-size: 26px;
}
@media only screen and (max-width: 479px) {
    .tab .nav-tabs li a{
        padding: 10px;
    }
    .tab .nav-tabs li.active:before{
        left: 28px;
        bottom: -24px;
        border-width: 12px;
    }
    .tab .nav-tabs li.active:after{
        left: 30px;
        bottom: -20px;
        border-width: 10px;
    }
}
span.round-tabs{
	width: 15px;
	height: 15px;
	line-height: 70px;
	display: inline-block;
	border-radius: 100px;
	background: white;
	z-index: 2;
	position: absolute;
	left: 45%;
	text-align: center;
	font-size: 25px;
	top: 89%;
}

span.round-tabs.one{
	border: 2px solid #ddd;
	color: #ddd;
}

li.active span.round-tabs.one, li.active span.round-tabs.two, li.active span.round-tabs.three, li.active span.round-tabs.four, li.active span.round-tabs.five {
	background: #f8f8f8 !important;
	border: 2px solid #f8f8f8;
	color: #fff;
}

span.round-tabs.two{
	border: 2px solid #ddd;
	color: #ddd;
}

span.round-tabs.three{
	border: 2px solid #ddd;
	color: #ddd;
}

.nav-tabs > li.active > a span.round-tabs{
	background: #fafafa;
}
<div class="tab" role="tabpanel">
<!-- Nav tabs -->
  <ul class="nav nav-tabs" role="tablist">
     <li role="presentation" class="active">
      <a href="#Section1" aria-controls="home" role="tab" data-toggle="tab" id="id1">Mission
        <span class="round-tabs one"><i class="icon icon-pencil"></i></span>
      </a>
     </li>
     <li role="presentation">
      <a href="#Section2" aria-controls="home" role="tab" data-toggle="tab" id="id2">Mission
        <span class="round-tabs one"><i class="icon icon-pencil"></i></span>
      </a>
     </li>
     <li role="presentation">
      <a href="#Section3" aria-controls="home" role="tab" data-toggle="tab" id="id3">Mission
        <span class="round-tabs one"><i class="icon icon-pencil"></i></span>
      </a>
     </li>
     <li role="presentation">
      <a href="#Section4" aria-controls="home" role="tab" data-toggle="tab" id="id4">Mission
        <span class="round-tabs one"><i class="icon icon-pencil"></i></span>
      </a>
     </li>
                    
   </ul>
   <div class="tab-content">
     <div role="tabpanel" class="tab-pane fade in active" id="Section1">
      <h3>Section 1</h3>
      <p>text here</p>
     </div>
     <div role="tabpanel" class="tab-pane fade" id="Section2">
      <h3>Section 2</h3>
      <p>text here</p>
      </div>
      <div role="tabpanel" class="tab-pane fade" id="Section3">
      <h3>Section 5</h3>
      <p>text here</p>
     </div>
     <div role="tabpanel" class="tab-pane fade" id="Section4">
      <h3>Section 4</h3>
      <p>text here</p>
      </div>
    </div>
</div>

enter image description here 你好,我想设计与image.i中显示的相同的菜单。我已尝试使用附加的code.little位我可以设计,但当我点击另一个菜单箭头不显示菜单下方。它显示在其他地方。如何实现图像中显示的相同菜单设计。

0 个答案:

没有答案