그래서 전이/호버 효과를 사용하여 코드를 연주했습니다.CSS3 호버 천이 이상 동작
HTML은
<section>
<a href="#" title="button">CLICK!</a>
<a href="#" title="button">CLICK!</a>
<a href="#" title="button">CLICK!</a>
<a href="#" title="button">CLICK!</a>
</section>
section {
width: 700px;
height: 500px;
margin: 250px auto;
position: relative;
background: #08c;
a {
border-radius: 51px;
background: #e60;
line-height: 100px;
text-align: center;
color: #04e;
font-size: 24px;
font-weight: bold;
font-family: tahoma;
text-decoration: none;
display: block;
width: 100px;
height: 100px;
&:nth-child(1){
position: absolute;
top: -100px;
left: -100px;
-webkit-transition: left 2s ease;
&:hover,
&:focus{
left: 800px;
}
}
&:nth-child(2){
position: absolute;
top: -100px;
right: -100px;
-webkit-transition: top 2s ease;
&:hover{
top: 600px;
}
}
&:nth-child(3){
position: absolute;
bottom: -100px;
right: -100px;
-webkit-transition: right 2s ease;
&:hover{
right: 600px;
}
}
&:nth-child(4){
position: absolute;
bottom: -100px;
left: -100px;
-webkit-transition: bottom 2s ease;
&:hover{
bottom: 600px;
}
}
}
}
예 LESS : http://jsbin.com/anitob/1
을하지만, 나는 이상한 일이 우연히 발견. 내가 링크 위로 마우스를 가져 가면 호버에 의해 적용된 올바른 위치로 이동하기 시작하지만 어떤 점에서는 (항상 다른 경우) 효과가 멈추고 원래 위치로 돌아갑니다!
누구든지이 문제를 알고 문제가 있음을 알고 있습니까?
편의를 위해 코드를 다시 게시 할 수 있습니까 (가급적이면 jsfiddle로)? 태그에 문자가 없기 때문에 복사 붙여 넣기에 일부 불량배가있는 것 같습니다. –
그런데 좋은 효과가 있습니다.) http://jsbin.com/anitob/1 – dmi3y