简体   繁体   English

CSS中的曲线菜单

[英]Curved Menu in 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: 他们要我做弯曲/拱形菜单:

在此输入图像描述

Is this possible to create? 这有可能创造吗? I've never come across something like this before and am baffled as to approach this. 我以前从未遇到过这样的事情,并且对于接近这个问题感到困惑。

You might be able to do it with canvas . 你也许可以用canvas做到这一点。 See the answer to Is there a way to curve / arc text using CSS3 / Canvas for a sample. 请参阅答案有没有办法使用CSS3 / Canvas为样本绘制曲线/弧形文本 Note that canvas is not supported by IE8 and earlier, but it is otherwise pretty widely supported in modern browsers. 请注意,IE8及更早版本不支持canvas ,但现代浏览器广泛支持它。

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. 您可能还想查看本教程中使用canvas绘制正弦波,因为图像中的菜单有点正弦波形。

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. 相反,您可以将其设为大图像并使用map元素制作图像地图。

You could also consturct it out of a series of small images. 你也可以用一系列小图像来构建它。

This isn't possible using CSS at all. 根本不可能使用CSS。 It would have to be created using sliced images or done in flash. 它必须使用切片图像创建或在闪存中完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM