Mimicking the iPhone design purely in CSS is nearly impossible. However:
I found iWebKit, written by a guy who spent a lot of time on just that task. He did the navigation buttons with border images. You can take a look at it at http://snippetspace.com/ . It's free to download, I think. Looking at the demo code, you can easily see how the buttons work. iWebKit is only for webkit browsers, but it does not take a lot of work to adapt to other browsers (just add -moz or -o lines where it says -webkit in the CSS).
发布评论
评论(2)
它是一个圆角矩形和一个三角形(或一个旋转的正方形)。要在“CSS”中实现它需要一些技巧。我建议你使用背景图片。
It's a rounded rectangle and a triangle (or a rotated square). To make it in "CSS" would require some hacks. I suggest you use a background image.
纯粹用 CSS 模仿 iPhone 设计几乎是不可能的。然而:
我发现了 iWebKit,它是由一个在这项任务上花费了大量时间的人编写的。他用边框图像制作了导航按钮。
您可以在 http://snippetspace.com/ 上查看。我想它是免费下载的。
查看演示代码,您可以轻松了解按钮的工作原理。
iWebKit 仅适用于 webkit 浏览器,但不需要做很多工作就能适应其他浏览器(只需在 CSS 中显示 -webkit 的位置添加 -moz 或 -o 行即可)。
Mimicking the iPhone design purely in CSS is nearly impossible. However:
I found iWebKit, written by a guy who spent a lot of time on just that task. He did the navigation buttons with border images.
You can take a look at it at http://snippetspace.com/ . It's free to download, I think.
Looking at the demo code, you can easily see how the buttons work.
iWebKit is only for webkit browsers, but it does not take a lot of work to adapt to other browsers (just add -moz or -o lines where it says -webkit in the CSS).