:在Internet Explorer中无法正常工作

时间:2013-06-08 01:19:30

标签: html css cross-browser cross-platform

标题前的箭头使用:before显示。该问题仅发生在Internet Explorer上。

//编辑:错误在那里,我的造型在p a。 也许这是问题吗?

所以,这是代码:

.special-title {
  font-size: 24px;
  color: #a4a19e;
  line-height: 1.2;
  position: relative;
  padding: 8px 0 8px 38px;
  border-top: 1px solid #e2dbcf;
  border-bottom: 1px solid #e2dbcf;
  margin-top: 49px;
  margin-bottom: 25px; }
.special-title:before {
  content: url('../img/general-title-decoration.svg?1369571463');
  position: absolute;
  width: 28px;
  left: 0;
  top: 23px;
  margin-top: -13px; }

和按钮:

.btn-call-to-action a {
  background: #8e8287;
  color: #f5f3e2;
  padding: 2px 60px 2px 10px;
  height: 35px;
  line-height: 40px;
  margin-top: 6px;
  display: inline-block;
  position: relative;
  border-radius: 2px;
  height: 40px;
  white-space: nowrap;
  -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 a:hover:after {
  -webkit-transform: translatex(6px);
  -moz-transform: translatex(6px);
  -o-transform: translatex(6px);
  -ms-transform: translatex(6px);
  transform: translatex(6px); }
.btn-call-to-action a:hover {
  background: #6f6469;
  border-bottom: none; }
.btn-call-to-action a:after {
  content: url('../img/general-white-arrow.svg?1369574895');
  position: absolute;
  width: 35px;
  right: 15px;
  top: 0px;
  -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; }

这是现场网站:http://aurelieremia.be/tfa/

1 个答案:

答案 0 :(得分:1)

在.special-title:之前,因为你正在使用绝对定位,所以删除

margin-top:-13px; 

然后使用

top:10px; 

代替。然后,声明高度和宽度。

请参阅http://jsfiddle.net/6TdB6/