【发布时间】:2016-06-16 17:19:09
【问题描述】:
我有这个页面,上面有书籍和动画作者的名字。页面上大约有 35 本书。
http://kutsalkitap.org/kaynaklar/
当您将鼠标放在一本书上时,作者的名字会淡入并慢慢下降。它在 chrome 上看起来很完美,但在 mozilla 上,名称比它应该的要低得多。通过其他书籍部分。
当我在 Mozilla 上查看该页面的源代码时,我看到书名周围的 <br> 元素在 chrome 上没有。这些<br> 不在我的代码中。
我尝试了一些方法,但无法修复它。有人可以帮我吗?
这是我的代码:
#nav li.parent {
margin-left: 1px;
width: 740px;
height: 130px;
text-align: center;
border: 1px solid #000;
margin: 10px;
list-style: none;
font-family: Montserrat, sans-serif;
font-size: 24px;
}
/* Effect 9: second text and borders */
#nav li.parent a {
margin: 0 20px;
padding: 18px 20px;
}
#nav li.parent a::before, #nav li.parent a::after {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 1px;
background: #fff;
content:'';
opacity: 0.2;
-webkit-transition: opacity 0.3s, height 0.3s;
-moz-transition: opacity 0.3s, height 0.3s;
transition: opacity 0.3s, height 0.3s;
}
#nav li.parent a::after {
top: 100%;
opacity: 0;
-webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
-moz-transition: -moz-transform 0.3s, opacity 0.3s;
transition: transform 0.3s, opacity 0.3s;
-webkit-transform: translateY(-10px);
-moz-transform: translateY(-10px);
transform: translateY(-10px);
}
#nav li.parent a span:first-child {
z-index: 2;
display: block;
font-weight: 300;
}
#nav li.parent a span:last-child {
z-index: 1;
display: block;
padding: 8px 0 0 0;
color: rgba(0, 0, 0, 0.4);
text-shadow: none;
text-transform: none;
font-style: italic;
font-size: 0.75em;
font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
opacity: 0;
-webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
-moz-transition: -moz-transform 0.3s, opacity 0.3s;
transition: transform 0.3s, opacity 0.3s;
-webkit-transform: translateY(-100%);
}
#nav li.parent a:hover::before, #nav li.parent a:focus::before {
height: 6px;
}
#nav li.parent a:hover::before, #nav li.parent a:hover::after, #nav li.parent a:focus::before, #nav li.parent a:focus::after {
opacity: 1;
-webkit-transform: translateY(0px);
}
#nav li.parent a:hover span:last-child, #nav li.parent a:focus span:last-child {
opacity: 1;
-webkit-transform: translateY(0%);
-moz-transform: translateY(0%);
transform: translateY(0%);
}
<ul id="nav">
<li class="parent">
<a href="http://www.kutsalkitap.org/allah-sevgidir">
<span class="text1" style="color:#000;font-size:24px;">Allah Sevgidir!</span>
<span class="text2" style="color:#000;font-size:18px;">Can Nuroğlu</span>
</a>
</li>
</ul>
【问题讨论】:
-
大量代码....
-
I tried a few things告诉我们什么 -
您是否安装了广告拦截器或任何其他扩展程序?
-
你能创建一个包含该问题的最小可运行示例吗? (stackoverflow.com/help/mcve)
-
当然,我在这里做了一个最小的例子小提琴:jsfiddle.net/eq54x15n