使用 CSS 创建圆角 [英] Creating rounded corners using CSS

查看:25
本文介绍了使用 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.

  1. CSS 设计:创建自定义角&边框
  2. CSS 圆角综述"
  3. 25 种 CSS 圆角技术

这篇关于使用 CSS 创建圆角的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆