score:0
this might be a starting point for you:
a{
text-decoration: none;
color: #999
}
ul {
width: 100px;
list-style: none;
}
li{
position: relative;
padding: 10px;
}
li.active{
border: 1px solid #e9e9e9;
border-top-left-radius: 20px;
border-bottom-left-radius: 20px;
border-right: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
position: relative;
margin-right: 20px;
}
li.active::before{
content: '';
display: block;
position: absolute;
top: -21px;
right: -20px;
width: 20px;
height: 20px;
border: 0;
border-bottom: 1px solid #e9e9e9;
border-right: 1px solid #e9e9e9;
border-bottom-right-radius: 20px;
}
li.active::after{
content: '';
display: block;
position: absolute;
bottom: -21px;
right: -20px;
width: 20px;
height: 20px;
border: 0;
border-top: 1px solid #e9e9e9;
border-right: 1px solid #e9e9e9;
border-top-right-radius: 20px;
}
<ul>
<li><a href="#">link 1</a></li>
<li><a href="#">link 2</a></li>
<li class="active"><a href="#">link 3</a></li>
<li><a href="#">link 4</a></li>
<li><a href="#">link 5</a></li>
<li><a href="#">link 6</a></li>
</ul>
score:0
here is a sample using two additional spans for the two corners. however there will be a problem with the menu shadow.
.container {
background-color: #e2e2e2;
padding: 20px 20px 20px 0;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
background-color: #fff;
width: 200px;
}
li {
border-radius: 0 30px 30px 0;
display: block;
position: relative;
line-height: 30px;
height: 30px;
}
li a {
display: block;
text-decoration: none;
color: grey;
line-height: 30px;
padding-left:20px
}
li.active {
background-color: #e2e2e2;
border-radius: 30px 0 0 30px;
}
li.active span.top {
display: inline-block;
width: 15px;
height: 15px;
overflow: hidden;
position: absolute;
top: -15px;
right: 0;
}
li.active span.top:before {
content: "";
display: block;
width: 200%;
height: 200%;
position: absolute;
border-radius: 50%;
bottom: 0;
right: 0;
box-shadow: 15px 15px 0 0 #e2e2e2;
}
li.active span.bottom {
display: inline-block;
width: 15px;
height: 15px;
overflow: hidden;
position: absolute;
top: 30px;
right: 0;
}
li.active span.bottom:before {
top: 0;
right: 0;
box-shadow: 15px -15px 0 0 #e2e2e2;
content: "";
display: block;
width: 200%;
height: 200%;
position: absolute;
border-radius: 50%;
}
<div class="container">
<ul>
<li><a href="">link 1</a></li>
<li class="active"><a href="">link 2</a><span class="top"></span><span class="bottom"></span></li>
<li><a href="">link 3</a></li>
<li><a href="">link 4</a></li>
<li><a href="">link 5</a></li>
</ul>
</div>
Source: stackoverflow.com
Related Query
- How to use border radios in a convex/ exterior way?
- How to use border radius only for 1 corner (react-native)?
- How to use ReactRouter CDN way without npm require?
- How can I use multiple refs for nested arrays of elements with hooks, or any other way
- How to Use Tableau WDC in a ReactJs app the correct way
- How to use setState to update the property of an object inside an array the right way in class component?
- How to use intl.formatRelativeTime() in the correct way
- How to use env variables in package json or the other way around
- How to use fabric ui textfields with a handler function - is there a way to give them a name?
- Server send an raw image in axios, how to convert it to base64 or other way to use this image
- Trying to figure out how to use socket.io the correct way in a useEffect that is using an axios get request to fetch messages
- How to use componentWillMount() in React Hooks?
- How to use `setState` callback on react hooks
- How to use comments in React
- How to use radio buttons in ReactJS?
- How to use switch statement inside a React component?
- How to use refs in React with Typescript
- How to use Redirect in version 5 of react-router-dom of Reactjs
- How can I use multiple refs for an array of elements with hooks?
- How to use callback with useState hook in react
- How to use Google fonts in React.js?
- How to resolve "Cannot use import statement outside a module" in jest
- How to use lifecycle method getDerivedStateFromProps as opposed to componentWillReceiveProps
- How to use React.forwardRef in a class based component?
- How to use children with React Stateless Functional Component in TypeScript?
- How can I make use of Error boundaries in functional React components?
- How to use JQuery with ReactJS
- How to use throttle or debounce with React Hook?
- How to use onClick event on react Link component?
- Webpack how to build production code and how to use it
More Query from same tag
- I have downloaded nodejs for react but when my powershell open to install external tools it gives error shown in the image:-
- Cannot find module issue with imports-loader when testing with Jest
- How to pass dependency in useEffect hook inside Context
- Switch and Constructor Component (React) to Change Source when passing props
- Configuration for mobile-friendly Airbnb's react-dates library
- I am trying to limit the number of my product list to 10
- Fetching documents in a subcollection of a cloud firestore database does not return any data
- Nested route link to two different components
- Date setting not working in react "useState"
- React Hook testing with renderHook
- How to make button 1 onClick to enable disabled button 2 in React?
- ReactJS How to transfer data between pages?
- React Routing : How can I be redirected to matching tab according to url?
- How to update Editor state from given JSON data of ContentState in react-draft-wysiwyg?
- upload zip file from reactjs to nodejs
- Opening modal from function in pure javascript
- React state is not updating, trying to use ES6 syntax
- Create-React-App - modify serviceWorker to poll for new updates?
- React state value is undefined
- React:: Error: GraphQL error: Cannot read property 'headers' of undefined
- Why doesn't my try catch block handle dispatch error?
- how to make an observable in react with other library
- How to destruct `data-*` (hyphen cased) attributes from props?
- Write HOC as Decorator in TypeScript?
- TS2531: Object possibly 'null'
- Addding elements to centered flexbox from left to right
- Placing an icon inside a text input in React component
- React: Remove default value when user starts typing
- I am displaying some content using dangerouslySetInnerHtml in Reactjs for a blog page, but bullet points are not showing
- React-S3 blocked by CORS policy