html - How to design aggregations filter in css for week, month? -


i want design aggregation filter week, month,etc. following image. please see image, want design same-way

image:image want design css

please see demo demo

<style type="text/css"> .tag {     /*display: block;*/     border: 1px solid #4f9f4f;     padding: 6px 12px;     font: 12px/17px 'opensanslight';     color: #4f9f4f;     text-decoration: none; } .tag-leftmost {     border: 1px solid #4f9f4f;     border-bottom-left-radius: 20px;     border-top-left-radius: 20px;      padding: 6px 12px;     font: 12px/17px 'opensanslight';     color: #4f9f4f;     text-decoration: none; } .tag-rightmost {    border: 1px solid #4f9f4f;      border-bottom-right-radius: 20px;     border-top-right-radius: 20px;        padding: 6px 12px;     font: 12px/17px 'opensanslight';     color: #4f9f4f;     text-decoration: none; } .tag-center tag{  } </style>    <div class="col-md-12 col-sm-12">      <a title="week? category" ng-model="today_placement" class="tag-leftmost">today</a>      <a title="week? category" ng-model="week_placement" class="tag">week</a>      <a title="week? category" ng-model="month_placement" class="tag">month</a>      <a title="week? category" ng-model="year_placement" class="tag-rightmost">year</a>   </div> 

try using css triangles hack make arrow. check .tag:hover:after

.wrapper {    border: 1px solid #4f9f4f;    border-radius: 20px;    padding: 0 14px;    float: left;  }  .tag {    padding: 6px 12px;    font: 12px/17px'opensanslight';    color: #4f9f4f;    text-decoration: none;    /* added :after */    position: relative;    float: left;  }  .tag:not(:first-child):not(:last-child) {    border-radius: 0;    border-left: 1px solid #4f9f4f;    border-right: 1px solid #4f9f4f;  }  .tag:hover {    background-color: red;    border-color: red;  }  .tag:hover:after {    content: '';    width: 0;    height: 0;    border: 5px solid transparent;    border-bottom-color: red;    position: absolute;    display: block;    left: 50%;    top: -10px;    margin-left: -5px;  }
<div class="wrapper col-md-12 col-sm-12">    <a title="week? category" class="tag">week</a>    <a title="week? category" class="tag">week</a>    <a title="week? category" class="tag">week</a>  </div>


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -