CSS 转换未按预期工作
CSS transitions don't work as expected
如果您在此处看到代码 https://jsfiddle.net/ojagwxc0/,则以下代码无效:
.parallax > div .txparallax a {
position: absolute;
top: 50%;
right: 0;
margin-top: -49px;
display: inline-block;
border-radius: 50%;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
background: #3498db;
width: 126px;
height: 126px;
line-height: 126px;
text-align: center;
overflow: hidden;
-moz-transition: 0.5s all ease;
-o-transition: 0.5s all ease;
-webkit-transition: 0.5s all ease;
transition: 0.5s all ease;
}
我只想看到 "Select"、"Fishing Tackle You Need" 和 "Mes cuml dia sed inenias ingerto lot aliiqt dolore ipsum commete".
字词的任何一种 "movement"
我做错了什么?请指教
你应该为 ex:
添加悬停动作
a:hover{
background-color:red;
}
工作 fiddle : https://jsfiddle.net/ojagwxc0/1/
尝试这样的事情。为了过渡到工作你需要以某种方式移动它,例如我在这里,将它从 left:0px;悬停到 left:400px:
https://jsfiddle.net/ojagwxc0/2/
.parallax > div .txparallax {
width: 100%;
padding-right: 150px;
display: inline-block;
position: relative;
left:0px;
}
.parallax > div .txparallax:hover{
left:400px;
-moz-transition: 0.5s all ease;
-o-transition: 0.5s all ease;
-webkit-transition: 0.5s all ease;
transition: 0.5s all ease;
}
如果您在此处看到代码 https://jsfiddle.net/ojagwxc0/,则以下代码无效:
.parallax > div .txparallax a {
position: absolute;
top: 50%;
right: 0;
margin-top: -49px;
display: inline-block;
border-radius: 50%;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
background: #3498db;
width: 126px;
height: 126px;
line-height: 126px;
text-align: center;
overflow: hidden;
-moz-transition: 0.5s all ease;
-o-transition: 0.5s all ease;
-webkit-transition: 0.5s all ease;
transition: 0.5s all ease;
}
我只想看到 "Select"、"Fishing Tackle You Need" 和 "Mes cuml dia sed inenias ingerto lot aliiqt dolore ipsum commete".
字词的任何一种 "movement"我做错了什么?请指教
你应该为 ex:
添加悬停动作 a:hover{
background-color:red;
}
工作 fiddle : https://jsfiddle.net/ojagwxc0/1/
尝试这样的事情。为了过渡到工作你需要以某种方式移动它,例如我在这里,将它从 left:0px;悬停到 left:400px:
https://jsfiddle.net/ojagwxc0/2/
.parallax > div .txparallax {
width: 100%;
padding-right: 150px;
display: inline-block;
position: relative;
left:0px;
}
.parallax > div .txparallax:hover{
left:400px;
-moz-transition: 0.5s all ease;
-o-transition: 0.5s all ease;
-webkit-transition: 0.5s all ease;
transition: 0.5s all ease;
}