【发布时间】:2014-11-17 23:41:20
【问题描述】:
我的 CSS 有问题。它在 chrome 上运行良好,但在 Mozilla Firefox 上运行良好。
当鼠标悬停在图标上时,我的代码将 twitter 图标移到左侧。
我的HTML代码:
<header>
<div id="animation">
<a href="http://www.facebook.com.tr">
<img id="socialiconface" src="images/facebook.png">
</a>
<a href="http://www.twitter.com.tr">
<img id="socialicon" src="images/twitter.png">
</a>
</div>
</header>
我的 CSS 在那里:
#socialicon {
position: absolute;
-webkit-transition-property: margin-right;
-moz-transition-property: margin-right;
-webkit-transition-duration: 2s;
-moz-transition-duration: 2s;
width: 40px;
height: 40px;
top: 5px;
right: 2px;
}
#socialiconface {
position: absolute;
width: 50px;
height: 50px;
top: 5px;
right: 2px;
}
#socialicon:hover {
margin-right: 70px;
}
不幸的是,无论我尝试了什么,都不起作用,有人可以帮助我吗?
【问题讨论】:
标签: html css google-chrome firefox mozilla