想要将按钮对齐到屏幕的右侧和左侧,当用户滚动(定位为绝对或固定)时保留按钮,然后在屏幕缩小时相对定位。
重大问题我希望白色三角形(背景)中的文字/图标指向内部。
到目前为止......
<div id="bnav">
<?php bnNav_content_nav( 'nav-below' ); ?>
</div>
CSS
[class*="navigation"] .nav-previous,
[class*="navigation"] .nav-next {
position: fixed;
z-index: 999;
top: 50%; bottom: 0;
transform: translateY(-30px);
}
[class*="navigation"] .nav-previous { left: 0px; }
[class*="navigation"] .nav-next { right: 0px; }
[class*="navigation"] .nav-previous a,
[class*="navigation"] .nav-next a {
display: block;
font-size: 1.75em;
color: #fff;
background-color: #1b1b1b;
text-align: center;
padding: 10px;
transition: background-color 0.35s ease;
-webkit-transition: background-color 0.35s ease;
-moz-transition: background-color 0.35s ease;
-ms-transition: background-color 0.35s ease;
-o-transition: background-color 0.35s ease;
}
文本是通过wordpress动态创建的,并放入div标记为.nav-next和.nav-previous