Helo Guys!Spinning Effect Anchor tag CSS3
Stavo cercando di creare un effetto hover di rotazione con CSS3.
Ho appena creato un effetto di rotazione del cerchio. Controllare il jsFiddle qui: http://jsfiddle.net/63yyeezn/26/
Tuttavia quello che voglio fare ora è quello di creare qualcosa di tthat gira, ma questa volta la sua forma di scatola
proprio come questa immagine:
Quindi, in pratica ho voglio un effetto simile proprio come il jsFiddle che ho mostrato sopra, ma questa volta deve essere una scatola.
Davvero avendo difficoltà a capirlo. Ecco il mio CSS:
body {
background: #292929;
padding-left: 30px;
font-size: 12px;
}
.twist {
display: inline-block;
font-size: 45px;
line-height: 90px;
cursor: pointer;
margin: 20px;
width: 90px;
height: 90px;
border-radius: 50%;
text-align: center;
position: relative;
text-decoration: none;
z-index: 1;
color: #fff;
}
.twist:after {
pointer-events: none;
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
content:'';
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.twist:before {
speak: none;
font-size: 48px;
line-height: 90px;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
display: block;
-webkit-font-smoothing: antialiased;
}
.twist.demo-4 {
width: 92px;
height: 92px;
box-shadow: 0 0 0 4px rgba(255, 255, 255, 1);
}
.twist.demo-4:before {
line-height: 92px;
}
.twist.demo-4:after {
top: -4px;
left: -4px;
padding: 0;
z-index: 10;
border: 4px dashed #fff;
}
.twist.demo-4:hover {
box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
color: #fff;
}
.twist.demo-4:hover i {
color: #fff;
}
.twist.demo-4.spin:hover {
-webkit-transition: box-shadow 0.2s;
-moz-transition: box-shadow 0.2s;
transition: box-shadow 0.2s;
}
.twist.demo-4.spin:hover:after {
-webkit-animation: spinAround 9s linear infinite;
-moz-animation: spinAround 9s linear infinite;
animation: spinAround 9s linear infinite;
}
@-webkit-keyframes spinAround {
from {
-webkit-transform: rotate(0deg)
}
to {
-webkit-transform: rotate(360deg);
}
}
@-moz-keyframes spinAround {
from {
-moz-transform: rotate(0deg)
}
to {
-moz-transform: rotate(360deg);
}
}
@keyframes spinAround {
from {
transform: rotate(0deg)
}
to {
transform: rotate(360deg);
}
}
Spero che tu possa aiutarmi con un file jsFiddle.
Grazie!
Dubbi che potresti farlo con i CSS ** eccetto ** in SVG _ http://css-tricks.com/svg-line-animation-works/ –
Dai un'occhiata a [questa domanda] (http: // stackoverflow.com/questions/5261122/moving-dotted-border-using-css). In particolare [risposta di Lea Verou] (http://stackoverflow.com/a/5270349/2007837) – hsan
C'è qualcuno che sa come farlo in PLAIN CSS3? Sarebbe utile a tutti noi. –