-
Notifications
You must be signed in to change notification settings - Fork 0
/
border-color-practise.html
55 lines (55 loc) · 1.14 KB
/
border-color-practise.html
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
51
52
53
54
55
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>border-color效果</title>
<style type="text/css">
body{
color: #fff;
background: #222;
}
h1{
font-size: 14px;
font-family: "Microsoft Yahei";
text-align: center;
}
.butterfly,
.butterfly .circle{
display:block;
width:300px;
height:300px;
border-radius:50%;
}
.butterfly{
position:relative;
margin:50px auto;
}
.butterfly .circle{
position:absolute;
top:0;
left:0;
border:1em solid #3b8210;
z-index:-1;
border-bottom-color:#ebc90b;
border-right-color:#ebc90b;
-webkit-transition:-webkit-transform 1s linear;
transition:transform 1s linear;
}
.butterfly img{
width:100%;
height:auto;
}
.butterfly:hover .circle{
-webkit-transform:rotate(180deg);
transform:rotate(180deg);
}
</style>
</head>
<body>
<h1>请使用webkit内核标准浏览器查看效果</h1>
<a href="http://image.haosou.com/i?q=%E8%9D%B4%E8%9D%B6&src=tab_www" class="butterfly" target="_blank">
<div class="circle"></div>
<img src="http://p3.qhimg.com/t014ca5b3e65fe126a6.png" alt="" />
</a>
</body>
</html>