html - Strange issue on image hover -


i´m doing effect on mouse image hover, i´m having problem.

i have 3 articles , when hover image other images moving right.

i found problem here: .second-effect:hover a.info{}, because if remove transform:scale(1,1) when hover image other images dont move.

but without transform icon font want show in center of image don´t appears.

the problem here:

.second-effect:hover a.info {     opacity:1;     -moz-transform:scale(1,1);     -webkit-transform:scale(1,1);     -o-transform:scale(1,1);     -ms-transform:scale(1,1);     transform:scale(1,1);     -moz-transition-delay:0.3s;     -webkit-transition-delay:0.3s;     -o-transition-delay:0.3s;     -ms-transition-delay:0.3s;     transition-delay:0.3s; } 

so want have icon font in center of image inside square i´m doing css transitions.

if remove transform:scale(1,1) icon dont appears.

if dont remove code when hover image, other images moving.

can understand why happening?

my jsfiddle:

http://jsfiddle.net/ritz/m78qf/1/

my whole html issue:

 <article id="news">     <div class="view second-effect">         <img src="imagens/transferir (1).jpg" />         <div class="mask">             <a href="#" class="info"><i class="fa fa-download"></i></a>         </div>      </div>       <h2>        <a>title post number one</a>         <br />      </h2>      <span>date of post number one</span>       <p>post number one</p> </article> 

my whole css issue:

.info>i{font-size:1.7em; margin-top:15px; color:#000;  }      #news img     {         width:155px;         height:140px;      }      .view a.info {         padding:0;        width:20px;        height:20px;     }      .view {        width: 155px;        height: 140px;        float: left;        overflow: hidden;        position: relative;        text-align: center;        box-shadow: 0px 0px 5px #aaa;        cursor: default;        margin-right:20px;         border:3px solid #ccc;        margin-top:4px;      }     .view .mask, .view .content {         width: 155px;        height: 140px;        position: absolute;        overflow: hidden;        top: 0;        left: 0;     }      .view img {        display: block;        position: relative;     }     .view a.info>i{      }         .second-effect .mask {        opacity: 0;        overflow:visible;        border:0px solid rgba(0,0,0,0.7);        -moz-box-sizing:border-box;        -webkit-box-sizing:border-box;        box-sizing:border-box;        -webkit-transition: 0.4s ease-in-out;        -moz-transition: 0.4s ease-in-out;        -o-transition: 0.4s ease-in-out;        -ms-transition: 0.4s ease-in-out;        transition: 0.4s ease-in-out;     }     .second-effect a.info {         position:relative;         top:-10px;         opacity:0;        -moz-transform:scale(0,0);        -webkit-transform:scale(0,0);        -o-transform:scale(0,0);        -ms-transform:scale(0,0);        transform:scale(0,0);        -webkit-transition: -webkit-transform 0.2s 0.1s ease-in, opacity 0.1s ease-in-out;        -moz-transition: -moz-transform 0.2s 0.1s ease-in, opacity 0.1s ease-in-out;        -o-transition: -o-transform 0.2s 0.1s ease-in, opacity 0.1s ease-in-out;        -ms-transition: -ms-transform 0.2s 0.1s ease-in, opacity 0.1s ease-in-out;        transition: transform 0.2s 0.1s ease-in, opacity 0.1s ease-in-out;     }     .second-effect:hover .mask {        opacity: 1;        border:55px solid rgba(0,0,0,0.7);     }     .second-effect:hover a.info {         opacity:1;         -moz-transform:scale(1,1);         -webkit-transform:scale(1,1);         -o-transform:scale(1,1);         -ms-transform:scale(1,1);         transform:scale(1,1);         -moz-transition-delay:0.3s;         -webkit-transition-delay:0.3s;         -o-transition-delay:0.3s;         -ms-transition-delay:0.3s;         transition-delay:0.3s;     } 

why css have margin-top set? not pushing down icon? try commenting out , see if changes icon's position. if does, reduce margin-top , should bring icon place.

.info>i { font-size:1.7em;  /* margin-top:15px; */  color:#000;  margin-bottom:5px;  } 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -