Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Curved Menu in CSS

Tags:

html

css

I have been given a file by a designer that I'm required to develop. They're asking me to do a curved/arching menu:

enter image description here

Is this possible to create? I've never come across something like this before and am baffled as to approach this.

like image 469
joshzee Avatar asked Jul 26 '12 03:07

joshzee


People also ask

How do I create a curved shape in CSS?

CSS Based Approaches: We can use ::before or ::after pseudo element to create this shape. Steps to create this are given below: Create a layer with ::before OR ::after pseudo element having width and height more than its parent. Add border-radius to create the rounded shape.

How do you make a curved active tab in navigation menu using HTML CSS and JavaScript?

With the help of HTML, CSS, and JavaScript, it is possible to create a navigation menu with a curved active tab. This can be done by using the ::before and ::after pseudo-elements to create the desired shape, and then using JavaScript to add the active class to the element.

How do I make my tab active in HTML?

To make the tabs toggleable, add the data-toggle="tab" attribute to each link. Then add a . tab-pane class with a unique ID for every tab and wrap them inside a <div> element with class . tab-content .


1 Answers

You might be able to do it with canvas. See the answer to Is there a way to curve / arc text using CSS3 / Canvas for a sample. Note that canvas is not supported by IE8 and earlier, but it is otherwise pretty widely supported in modern browsers.

You might also want to look at this tutorial on drawing a sine wave with canvas since the menu in your image is somewhat sine wave shaped.

That's a lot of work though for something like this, though. Instead, you can just make it a big image and use a map element to make an image map.

You could also consturct it out of a series of small images.

like image 134
Trott Avatar answered Oct 01 '22 18:10

Trott