【问题标题】:how to make a rectangle/square with curved edges in html? [duplicate]如何在html中制作一个带有弯曲边缘的矩形/正方形? [复制]
【发布时间】:2011-05-09 13:24:48
【问题描述】:

可能的重复:
css/ html help in making rounded table like container
What is the best way to create rounded corners using CSS?

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

【问题讨论】:

标签: html


【解决方案1】:

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

【讨论】:

    【解决方案2】:

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

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

    【讨论】:

      【解决方案3】:

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

      【讨论】:

        【解决方案4】:

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

        供应商实施:

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

        请注意:

        • HTML用于指定文档的内容。
        • CSS 用于演示文档。

        【讨论】:

        • 也许值得指定各种供应商前缀选项。不过,我不确定它们是否仍然需要... =/
        猜你喜欢
        • 1970-01-01
        • 2014-09-09
        • 1970-01-01
        • 1970-01-01
        • 2015-05-05
        • 1970-01-01
        • 1970-01-01
        • 2023-03-25
        相关资源
        最近更新 更多