gpt4 book ai didi

css - 所有浏览器的边框半径?

转载 作者:技术小花猫 更新时间:2023-10-29 11:20:15 24 4
gpt4 key购买 nike

我用

-webkit-border-radius: 5px;    
border-radius: 5px;
-moz-border-radius:5px;
-khtml-border-radius:5px;

用于边框半径,但该代码块不适用于某些浏览器(当然是 Internet Explorer)。我尝试使用 .htc 但没有成功。

如何制作所有浏览器都支持的border-radius

最佳答案

border-radius 属性在 IE9+、Firefox 4+、Chrome、Safari 5+ 和 Opera 中受支持,因为它是 CSS3 属性。语法是:

border-radius: 1-4 length|% / 1-4 length|%;

示例 1

border-radius:2em;

相当于:

border-top-left-radius:2em;
border-top-right-radius:2em;
border-bottom-right-radius:2em;
border-bottom-left-radius:2em;

示例 2

border-radius: 2em 1em 4em / 0.5em 3em;

相当于:

border-top-left-radius: 2em 0.5em;
border-top-right-radius: 1em 3em;
border-bottom-right-radius: 4em 0.5em;
border-bottom-left-radius: 1em 3em;

查看边界半径的更详细解释和提示和技巧 here .

关于css - 所有浏览器的边框半径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13191438/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com