开发者

how to make a rectangle/square with curved edges in html? [duplicate]

This question already has answers here: Closed 12 years ago.

Possible Duplicates:

css/ html help in making rounded table like container

What is the best way to开发者_运维技巧 create rounded corners using CSS?

how to make a rectangle/square with curved edges in html?


use CSS border radius: http://border-radius.com/


You need to draw the rectangle/square on a canvas, then manually round the corners. This method only works for HTML5-compatible browsers (not IE8).

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


Curved Lines in HTML5 canvas http://fjd1.com/canvas002.html


You could use the CSS 3 property border-radius.

Vendor implementations:

  • Gecko: -moz-border-radius
  • WebKit: -webkit-border-radius

Please note:

  • HTML is used for specifying content of the document.
  • CSS is used for presentation of the document.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜