边框旋转


<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>边框旋转</title>
<style type="text/css">
.base{border-radius: 50%;-moz-border-radius: 50%;-o-border-radius: 50%;
-webkit-border-radius: 50%;-ms-border-radius: 50%;}
.box {
width: 200px;
height: 200px;
margin: 0px auto;
position: relative;
}
.description{
width: 200px;
height: 200px;
position: absolute;
top: 0px;
left: 0px;
text-align: center;
line-height: 200px;
color:cadetblue;
font-size: 25px;
font-weight: bolder;
opacity: 0.5;
transition: 0.3s ease;
-o-transition: 0.3s ease;
-ms-transition: 0.3s ease;
-moz-transition: 0.3s ease;
-webkit-transition: 0.3s ease;
background-color: #CCE8CF;
font-family: 华文行楷;
}
.description a{text-decoration: none;display: block;}
.border {
width: 200px;
height: 200px;
border-top: 2px solid orangered;
border-left: 2px solid blue;
border-bottom: 2px solid yellow;
border-right: 2px solid black;
position: absolute;
top: -2px;
left: -2px;
transition: 0.5s ease;
opacity: 0.4;
}
img {
width: 200px;
height: 200px;
}
.box:hover .border {
transform: rotate(260deg);
-o-transform: rotate(260deg);
-webkit-transform: rotate(260deg);
-ms-transform: rotate(260deg);
-moz-transform: rotate(260deg);
opacity: 1;
}
.box:hover .description {
opacity: 0;
}
</style>
</head>
<body>
<div class="box base">
<img src="images/1.jpg" class="base"/>

<div class="border base"></div>

<div class="description base">
<a href="#">Hi</a>
</div>
</div>
</body>
</html>
posted @ 2015-05-06 16:53  灵创--点滴  阅读(132)  评论(0)    收藏  举报