CSS animation
Анимированный border картинок
by akogch
HTML
<h1>5 CSS3 Animated Image Borders</h1>
<hr />
<h3>Solid - Animated Border</h3>
<div class="border solid"></div>
<img
src="http://4.bp.blogspot.com/-PMdKDQ6bm1k/VFK2baK8iEI/AAAAAAAA0vY/mX6UsaXwK-c/s1600/Pawan%2BMall%2B-%2BProfile%2BPic-Small.jpg"
class="profile-img"
/>
<hr class="clear" />
<h3>Dashed - Animated Border</h3>
<div class="border dashed"></div>
<img
src="http://4.bp.blogspot.com/-PMdKDQ6bm1k/VFK2baK8iEI/AAAAAAAA0vY/mX6UsaXwK-c/s1600/Pawan%2BMall%2B-%2BProfile%2BPic-Small.jpg"
class="profile-img"
/>
<hr class="clear" />
<h3>Dotted - Animated Border</h3>
<div class="border dotted"></div>
<img
src="http://4.bp.blogspot.com/-PMdKDQ6bm1k/VFK2baK8iEI/AAAAAAAA0vY/mX6UsaXwK-c/s1600/Pawan%2BMall%2B-%2BProfile%2BPic-Small.jpg"
class="profile-img"
/>
<hr class="clear" />
<h3>Groove - Animated Border</h3>
<div class="border groove"></div>
<img
src="http://4.bp.blogspot.com/-PMdKDQ6bm1k/VFK2baK8iEI/AAAAAAAA0vY/mX6UsaXwK-c/s1600/Pawan%2BMall%2B-%2BProfile%2BPic-Small.jpg"
class="profile-img"
/>
CSS
/*
// 5 CSS3 Animated Image Borders
// Made with ❤ by @Pawan_Mall
// http://www.pawanmall.net
*/
@import url(http://fonts.googleapis.com/css?family=Audiowide);
body {
margin: auto 5%;
background: #272822;
font-family: "Audiowide", sans-serif;
font-size: 20px;
}
.border {
position: relative;
left: 30%;
width: 40px;
height: 40px;
-webkit-transition-property: -webkit-transform;
-webkit-transition-duration: 1s;
-moz-transition-property: -moz-transform;
-moz-transition-duration: 1s;
transition-property: transform;
transition-duration: 1s;
border-radius: 100%;
z-index: -1;
-webkit-animation-name: rotate;
-webkit-animation-duration: 2s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
-moz-animation-name: rotate;
-moz-animation-duration: 2s;
-moz-animation-iteration-count: infinite;
-moz-animation-timing-function: linear;
animation-name: rotate;
animation-duration: 2s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
.b5 {
border-style: solid;
border-width: 75px;
border-color: red;
}
.groove {
border-style: groove;
border-width: 75px;
border-color: orange;
}
.dotted {
border-style: dotted;
border-width: 75px;
border-color: blue;
}
.dashed {
border-style: dashed;
border-width: 75px;
border-color: green;
}
.solid {
border-style: solid;
border-width: 75px;
border-color: red blue green orange;
}
.profile-img {
position: relative;
top: -170px;
left: 34%;
width: 150px;
height: 150px;
border-style: solid;
border-color: red blue green orange;
border-radius: 100%;
z-index: 999;
}
h1,
h3 {
color: #fff;
text-align: center;
text-shadow: 5px 5px #000;
}
@-webkit-keyframes rotate {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
}
}
@-moz-keyframes...