この Web サイト ( http://www.usatoday.com ) にあるような、これらのオーバーレイの前後の矢印を作成しています。
そして、私が得ている問題はChromeにあります.ページを下にスクロールすると、矢印がページとともに上がり、矢印が表示されなくなります. 奇妙なことに、Firefox では機能し、上位にとどまります: 45% の位置: 本来あるべきように常に固定されています。ff での動作のスクリーンショットは次のとおりです: https://www.dropbox.com/s/2vsrv874c3urlqs/firefox.PNG
ここにクロムがあります:https ://www.dropbox.com/s/zgr2zhkcnohykgj/chrome.PNG
矢印の html:
<div class="overlay-arrows">
<div class="front-arrow-wrapper">
<a href="#" rel="prev" class="prev-link">
<div class="prev-icon">
</div>
<div class="prev-overlay">
<span class="categ-next">Category for prev</span>
<p>Title of the post for prev</p>
</div>
</a>
<a href="#" rel="next" class="next-link" >
<div class="next-icon">
</div>
<div class="next-overlay">
<span class="categ-next">Category for next</span>
<p>Title of the post for next</p>
</div>
</a>
</div> <!--end .front-arrow-wrapper -->
</div> <!--end overlay-arrows -->
そしてCSS:
.overlay-arrows{
position: fixed;
top: 45%;
left: 0;
width: 100%;
z-index: 9999;
overflow: visible;
}
.front-arrow-wrapper{
width: 1104px;
position: relative;
margin: 0 auto;
}
.prev-link{
left: 0;
float: left;
text-decoration: none;
}
.next-link{
right: 0;
float: right;
text-decoration: none;
}
.prev-icon{
background: url(../img/prev.png) 100% 0 no-repeat;
height: 77px;
width: 45px;
float: left;
}
.next-icon{
background: url(../img/next.png) 100% 0 no-repeat;
height: 77px;
float: right;
width: 45px;
}
.next-overlay, .prev-overlay{
opacity: 0;
filter: alpha(opacity=0);
width: 250px;
width: 250px;
height: 77px;
color: #F16C14;
background: rgba(0, 0, 0, 0.7);
font-size: 14px;
font-family: Helvetica, Arial, "Lucida Grande", sans-serif;
}
.next-link:hover>.next-icon{
-webkit-transition: all 0.2s ease-out;
-moz-transition: all 0.2s ease-out;
-o-transition: all 0.2s ease-out;
transition: all 0.2s ease-out;
background: url(../img/next-hover.png) 100% 0 no-repeat;
}
.next-link:hover>.next-overlay{
-webkit-transition: all 0.2s ease-out;
-moz-transition: all 0.2s ease-out;
-o-transition: all 0.2s ease-out;
transition: all 0.2s ease-out;
opacity: 10;
filter: alpha(opacity=100);
}