css border-radius属性怎么用


本文摘自PHP中文网,作者藏色散人,侵删。

css border-radius属性是一个简写属性,用于设置四个 border-*-radius 属性,其语法是语法border-radius: 1-4 length|% / 1-4 length|%。

css border-radius属性怎么用

作用:简写属性,用于设置四个 border-*-radius 属性。

语法:

1

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

说明:

length 定义圆角的形状。

% 以百分比定义圆角的形状。

注释:

按此顺序设置每个 radii 的四个值。如果省略 bottom-left,则与 top-right 相同。如果省略 bottom-right,则与 top-left 相同。如果省略 top-right,则与 top-left 相同。

css border-radius属性使用示例

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

<!DOCTYPE html>

<html>

<head>

<style>

div

{

text-align:center;

border:2px solid #a1a1a1;

padding:10px 40px;

background:#dddddd;

width:350px;

border-radius:25px;

-moz-border-radius:25px; /* 老的 Firefox */

}

</style>

</head>

<body>

<div>border-radius 属性允许您向元素添加圆角。</div>

</body>

</html>

效果输出:

db4eea238199fb19296fe9575702484.png

以上就是css border-radius属性怎么用的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

css align-self属性怎么用

css如何去除边框

js怎么替换css样式

浅谈css perspective属性和perspective()函数的异同点

css 实现三栏自适应布局

css怎么设置背景图大小

css中的图片翻转属性是什么

css是干什么的

css如何设置字体

css中如何把正方形变成圆形

更多相关阅读请进入《css》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...