首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

-moz-outline-radius

非标准

此功能是非标准的。不要在面向Web的生产站点上使用它:它并不适用于每个用户。实现之间也可能存在很大的不兼容性,而且这种行为在未来可能会发生变化。

在Firefox等Mozilla应用程序中,可以使用-moz-outline-radius CSS属性可用于来给出元素的outline圆角。

代码语言:javascript
复制
/* One value */
-moz-outline-radius: 25px;

/* Two values */
-moz-outline-radius: 25px 1em;

/* Three values */
-moz-outline-radius: 25px 1em 12%;

/* Four values */
-moz-outline-radius: 25px 1em 12% 4mm;

/* Global values */
-moz-outline-radius: inherit;
-moz-outline-radius: initial;
-moz-outline-radius: unset;

此属性是用于设置四个属性的简写:-moz-outline-radius-topleft-moz-outline-radius-topright-moz-outline-radius-bottomright-moz-outline-radius-bottomleft

初始值

as each of the properties of the shorthand: -moz-outline-radius-topleft: 0 -moz-outline-radius-topright: 0 -moz-outline-radius-bottomright: 0 -moz-outline-radius-bottomleft: 0

适用元素

all elements

是否是继承属性

no

Percentages

as each of the properties of the shorthand: -moz-outline-radius-topleft: refer to the corresponding dimension of the border box -moz-outline-radius-topright: refer to the corresponding dimension of the border box -moz-outline-radius-bottomright: refer to the corresponding dimension of the border box -moz-outline-radius-bottomleft: refer to the corresponding dimension of the border box

适用媒体

visual

计算值

as each of the properties of the shorthand: -moz-outline-radius-topleft: as specified -moz-outline-radius-topright: as specified -moz-outline-radius-bottomright: as specified -moz-outline-radius-bottomleft: as specified

Animation type

as each of the properties of the shorthand: -moz-outline-radius-topleft: a length, percentage or calc(); -moz-outline-radius-topright: a length, percentage or calc(); -moz-outline-radius-bottomright: a length, percentage or calc(); -moz-outline-radius-bottomleft: a length, percentage or calc();

正规顺序

the unique non-ambiguous order defined by the formal grammar

  • -moz-outline-radius-topleft0
  • -moz-outline-radius-topright0
  • -moz-outline-radius-bottomright0
  • -moz-outline-radius-bottomleft0
代码语言:txt
复制
Applies to all elements   [Inherited](inheritance) no   Percentages as each of the properties of the shorthand:
  • -moz-outline-radius-topleft:参考边框的相应尺寸
  • -moz-outline-radius-topright:参考边框的相应尺寸
  • -moz-outline-radius-bottomright:参考边框的相应尺寸
  • -moz-outline-radius-bottomleft:参考边框的相应尺寸
代码语言:txt
复制
Media visual   [Computed value](computed_value) as each of the properties of the shorthand:
  • -moz-outline-radius-topleft:具体规定
  • -moz-outline-radius-topright:具体规定
  • -moz-outline-radius-bottomright:具体规定
  • -moz-outline-radius-bottomleft:具体规定
代码语言:txt
复制
Animation type as each of the properties of the shorthand:
  • -moz-outline-radius-topleft:长度,百分比或calc();
  • -moz-outline-radius-topright:长度,百分比或calc();
  • -moz-outline-radius-bottomright:长度,百分比或calc();
  • -moz-outline-radius-bottomleft:长度,百分比或calc();
代码语言:txt
复制
Canonical order the unique non-ambiguous order defined by the formal grammar  

语法

椭圆轮廓border-radius中对<percentage>描述的语法。

一,二,三或四个<outline-radius>值,表示下列之一:

<length>更多可能的值见<length><percentage>一个<percentage>;关于更多细节可见border-radius

  • 如果设置了单个值,它可适用于4个角。
  • 如果设置了两个值,第一个值适用于左上角和右下角,第二个值适用于右上角和左下角。
  • 如果设置了三个值,则第一个适用于左上角,第二个适用于右上角和左下角,第三个适用于右下角。
  • 如果设置了四个值,则第一个值适用于左上角,第二个值适用于右上角,第三个值适用于右下角,第四个值适用于左下角。

正式语法

代码语言:javascript
复制
<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?

示例

HTML

代码语言:javascript
复制
<p>This element has a rounded outline!</p>

CSS

代码语言:javascript
复制
p {
  margin: 5px;
  border: 1px solid black;
  outline: dotted red;
  -moz-outline-radius: 12% 1em 25px;
}

结果

注释

  • 未来版本的Gecko / Firefox可能完全丢弃这个属性。查看错误315209

规范

这个属性在任何CSS标准中都没有定义。

浏览器兼容性

Feature

Chrome

Firefox (Gecko)

Internet Explorer

Opera

Safari (WebKit)

Basic support

No support

1.5 (1.8)

No support

No support

No support

Feature

Android

Android Webview

Firefox Mobile (Gecko)

Firefox OS

IE Mobile

Opera Mobile

Safari Mobile

Chrome for Android

Basic support

No support

No support

1.0 (1.8)

?

No support

No support

No support

No support

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com