:在悬停转换后,make元素移动

时间:2013-06-09 15:35:26

标签: html css css3

我把图像放在:之后,翻译为:悬停。它使其他不相关的元素在Chrome上运行,OS X(Firefox:无响应,Safari:不支持过渡效果)

我试过没有过渡,工作正常。

我有几个元素,只要涉及transition和:after,它们都有同样的问题。

这是html:

<a href="work-timburton.html"  class="btn-call-to-action">See the project</a>

和css:

.btn-call-to-action {
  background: #8e8287;
  margin-bottom: 15px;
  color: #f5f3e2;
  padding: 10px 70px 10px 10px;
  margin-top: 6px;
  line-height: 1;
  display: inline-block;
  position: relative;
  border-bottom: none;
  border-radius: 2px;
  white-space: nowrap; }

.btn-call-to-action:after {
  content: url('../img/general-white-arrow.svg?1370787761');
  position: relative;
  display: inline-block;
  position: absolute;
  top: 8px;
  width: 35px;
  padding-left: 15px;
  -webkit-transition: all 0.2s ease-in-out;
  -moz-transition: all 0.2s ease-in-out;
  -o-transition: all 0.2s ease-in-out;
  -ms-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out; }

.btn-call-to-action:hover:after {
  -webkit-transform: translatex(6px);
  -moz-transform: translatex(6px);
  -o-transform: translatex(6px);
  -ms-transform: translatex(6px);
  transform: translatex(6px); }

and the live version here.

0 个答案:

没有答案