如何在html中制作一个带有弯曲边缘的矩形/正方形?

问题描述:

可能显示的文件:
css/ html help in making rounded table like container
What is the best way to create rounded corners using CSS?如何在html中制作一个带有弯曲边缘的矩形/正方形?

如何使一个矩形/正方形,以html弯曲边缘?

+1

弯曲的边缘?也许你的意思是圆角? http://stackoverflow.com/questions/7089/what-is-the-best-way-to-create-rounded-corners-using-css – Guffa 2010-11-13 15:09:03

您可以使用CSS 3属性border-radius

商实现:

  • 壁虎:-moz-border-radius
  • WebKit的:-webkit-border-radius

请注意:

  • HTML用于指定该文档的内容。
  • CSS用于呈现文档。
+0

也许值得指出各种厂商前缀的选项。我不确定他们是否仍然需要,尽管... =/ – 2010-11-13 15:10:40

+0

David:完成。谢谢。 – 2010-11-13 15:16:49

您需要在画布上绘制矩形/正方形,然后手动圆角。此方法仅适用于HTML5兼容的浏览器(而不是IE8)。

http://thinkvitamin.com/code/how-to-draw-with-html-5-canvas/

使用CSS边界半径:http://border-radius.com/

曲线在HTML5画布http://fjd1.com/canvas002.html