CSS Box形状

时间:2009-06-23 19:26:01

标签: css

使用CSS可以为包装盒设置圆角或切角吗?如果是的话,请让我知道。

感谢。

1 个答案:

答案 0 :(得分:2)

可能有圆角:

.element {-webkit-border-radius: 1em; /* applies to all four corners */
          -webkit-border-top-left-radius: 1em; /* applies to only the identified (top left) corner) */
          -webkit-border-top-right-radius: 1em;
          -webkit-border-bottom-left-radius: 1em;
          -webkit-border-bottom-right-radius: 1em;

          -moz-border-radius: 1em; /* applies to all four corners */
          -moz-border-radius-topleft: 1em; /* applies only to identified (top left) corner */
          -moz-border-radius-bottomright: 1em /* and so on... */

          border-radius: 1em; /* CSS 3 only */
          border-top-right-radius: 1em; /* Applies to only identified (top right) corner */
}

我推荐您: http://www.the-art-of-web.com/css/border-radius/

我认为,只有使用图像才能实现削减角落。