使用CSS创建圆角 [英] Creating rounded corners using CSS
问题描述
如何使用CSS创建圆角?
How can I create rounded corners using CSS?
推荐答案
由于引入了CSS3, CSS是通过使用 border-radius
属性。您可以阅读资源上的规范,或获取一些有关MDN的实用信息:
Since CSS3 was introduced, the best way to add rounded corners using CSS is by using the border-radius
property. You can read the spec on the property, or get some useful implementation information on MDN:
如果您使用的浏览器不 implement border-radius
(Chrome pre-v4,Firefox pre-v4,IE8, Opera pre-v10.5,Safari pre-v5),那么下面的链接详细介绍了一大堆不同的方法。找到一个适合您的网站和编码风格,并与之一起使用。
If you are using a browser that doesn't implement border-radius
(Chrome pre-v4, Firefox pre-v4, IE8, Opera pre-v10.5, Safari pre-v5), then the links below detail a whole bunch of different approaches. Find one that suits your site and coding style, and go with it.
- CSS Design: Creating Custom Corners & Borders
- CSS Rounded Corners 'Roundup'
- 25 Rounded Corners Techniques with CSS
这篇关于使用CSS创建圆角的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!