开发者

Images jump 5 pixels on click

开发者 https://www.devze.com 2023-04-02 05:06 出处:网络
I have two clickable images inside a div. They jump 3-6 pixels when 开发者_运维知识库clicked. If I set it to fixed or absolute it doesn\'t jump but floating the elements together in one div is good fo

I have two clickable images inside a div. They jump 3-6 pixels when 开发者_运维知识库clicked. If I set it to fixed or absolute it doesn't jump but floating the elements together in one div is good formatting.

 <div class="buttons">
     <a onclick="$('.positionHelper').scrollTo( {top:'-=100px', left:'0'}, 800 );" href="#">
         <img src="images/up.png" />
     </a>
     <a onclick="$('.positionHelper').scrollTo( {top:'+=100px', left:'0'}, 800 );" href="#">
         <img src="images/down.png" />
     </a>
 </div>

.buttons {
    float: left;
    margin-top: -34px;
    position: relative;
    top: 100%;
}


Set the line-height of .buttons to 0.

0

精彩评论

暂无评论...
验证码 换一张
取 消