undefined

css3新增UI样式

圆角border-radius

border-radius:1-4个数字/1-4个数字

前面是水平,后面是垂直

不给”/“,则水平和垂直一样 border-radius:10px/5px

参数:各种长度单位都可以:px,%, %有时候很方便,但是宽高不一致时不太好

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE HTML>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<style>
.box {
width: 400px;
height: 400px;
margin: 50px auto;
transition: 5s linear;
}

.box div {
width: 180px;
height: 180px;
margin: 10px;
border: 1px solid #000;
box-sizing: border-box;
float: left;
background: url(new_bg.png) no-repeat;
}

.box div:nth-child(1),
.box div:nth-child(4) {
border-radius: 0 70%;
}

.box div:nth-child(2),
.box div:nth-child(3) {
border-radius: 70% 0;
}

.box:hover {
-webkit-transform: rotate(720deg);
}
</style>
</head>

<body>
<div class="box">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</body>

</html>

觉得本站不错,请作者吃根辣条