如何在 Google Chrome 中使用 CSS 实现圆角
基本上我想弄清楚如何在 CSS 中的 DIV 上做圆角,该圆角将在 google chrome 中呈现
Basically I am trying to work out how I do rounded corners on a DIV in CSS that will render in google chrome
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
Google Chrome(和 Safari)使用以下 CSS 3 前缀,
所有角的
左上角为 10 像素,左下角为 8 像素
对于 Firefox,您可以使用:
所有角以及
左上角和左下角
Google Chrome (and Safari) work with the following CSS 3 prefixes
for all corners at 10px
for the top left corner and bottom left at 8px
For Firefox you can use:
for all the corners and
for the top left corner and bottom left
要涵盖 Chrome、FF 和任何支持 CSS 3 的浏览器:
To cover both Chrome, FF and any browser that supports CSS 3:
像这样编写 css 代码对未来很有用:
这样,当 IE9/IE10 出现时,您的代码也将在那里工作:D
It's future-useful to code your css like this:
That way, when IE9/IE10 comes out your code will also work there as well :D
鉴于现在所有浏览器都支持无前缀的 border-radius ;请参阅:http://caniuse.com/#search=border-radius 的正确语法今天的使用很简单:
Given that all browsers now support border-radius without prefixes; see: http://caniuse.com/#search=border-radius the correct syntax to use today is simply:
是的,但唯一的问题是,你实际上抛出了 css 错误,因为 IE 被劫持了,而 Microshaft 不想对此做任何事情,我使用的修复是基于 js 的,但我想大多数人都知道这一点。但是,我使用它的原因是因为它始终适用于我以及所有主要浏览器。干得好。
Yes but the only problem with this is that you are actually throwing css errors because of IE being jacked and Microshaft not wanting to do anything about it, the fix that i use is js based but I imagine most people know all about that. But, the reason I use it is because it always works for me and on all the major browsers. Here you go.