Html button with custom angles

I am currently developing a navigation bar for a website using Bootstrap. There is a main navigation panel, and the second is directly below the first, see Image:

enter image description here
I managed to round the corners of the bottom of the button with simple CSS, but for the top corners, I would like to achieve something like this:

enter image description here
Is there a way to do this in CSS / jQuery or with an additional plugin?

EDIT:

HTML for the button:

<button type="submit" class="btn navbar-btn second-navbar-button">
    <span class="mdi mdi-eye second-navbar-icon"></span>
    <span class="second-navbar-name">&nbsp;Overview</span>
</button>

The CSS for the button is as follows

.second-navbar-button {
  font-size: 26px;
  border: none;
  background-color: transparent;
  color: #ec9f14;
  margin: 0 19px 0 19px;
  padding: 0px 8px 0px 8px;
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;}

There is a space between the buttons, so manipulating the corners of the adjacent button will not work, afaik.

Greetings

Trammy

+4
source share
1 answer

. :

.button{
    border:1px solid red;
    border-bottom:0;
    width:80px;
    height:40px;
    margin:30px;
    position:relative;
    -moz-border-radius:5px 5px 0 0;
    -webkit-border-radius:5px 5px 0 0;
}
.button:after,
.button:before{
    content:'';
    width:40px;
    height:30px;
    border:1px solid red;
    position:absolute;
    bottom:-3px;
    border-top:0;
}
.button:after{
    border-left:0;
    -moz-border-radius:0 0 5px 0;
    -webkit-border-radius:0 0 5px 0;
    left:-41px;
}
.button:before{
    border-right:0;
    -moz-border-radius:0 0 0 5px;
    -webkit-border-radius:0 0 0 5px;
    right:-41px;
}
<div class="button">text</div>
Hide result
+1

All Articles