kanenas
kanenas

Reputation: 879

CSS transitions don't work as expected

If you see the code here https://jsfiddle.net/ojagwxc0/ the following is not working :

.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;
}

All I want to see is any kind of "movement" for the words "Select", "Fishing Tackle You Need" & "Mes cuml dia sed inenias ingerto lot aliiqt dolore ipsum commete".

What am I doing wrong? Please advice.

Upvotes: 1

Views: 68

Answers (2)

Benneb10
Benneb10

Reputation: 1489

Try somthing like this. For a transition to work you need to be moving it somehow, for example here I'm, moving it from left:0px; to left:400px on hover:

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;
}

Upvotes: 3

Hasan Daghash
Hasan Daghash

Reputation: 1691

you should add an action on hover for ex:

 a:hover{
    background-color:red;
}

working fiddle : https://jsfiddle.net/ojagwxc0/1/

Upvotes: 0

Related Questions