調整上下頁樣式
This commit is contained in:
parent
9b0762f1e9
commit
3f836c8374
|
@ -1,14 +1,17 @@
|
||||||
<div id="magazine">
|
<div class="publication">
|
||||||
|
<div id="magazine">
|
||||||
|
</div>
|
||||||
|
<ul class="button-mid">
|
||||||
|
<i class="fa fa-angle-left prev-button" aria-label="上一張"></i>
|
||||||
|
<i class="fa fa-angle-right next-button" aria-label="下一張"></i>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<%= stylesheet_link_tag "publications/pdf-turn.css" %>
|
<%= stylesheet_link_tag "publications/pdf-turn.css" %>
|
||||||
<%= javascript_include_tag "publications/pdf/pdf.worker.js" %>
|
<%= javascript_include_tag "publications/pdf/pdf.worker.js" %>
|
||||||
<%= javascript_include_tag "publications/pdf/pdf.js" %>
|
<%= javascript_include_tag "publications/pdf/pdf.js" %>
|
||||||
<%= javascript_include_tag "publications/turn.min.js" %>
|
<%= javascript_include_tag "publications/turn.min.js" %>
|
||||||
<%= javascript_include_tag "publications/pdf-turn.js" %>
|
<%= javascript_include_tag "publications/pdf-turn.js" %>
|
||||||
<div class="flip-control">
|
|
||||||
<a href="#" id="prev"> Previous </a>
|
|
||||||
<a href="#" id="next"> Next </a>
|
|
||||||
</div>
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
div.flip-control {
|
div.flip-control {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
|
@ -21,14 +24,14 @@ div.flip-control a {
|
||||||
#magazine {
|
#magazine {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#magazine .turn-page {
|
#magazine .turn-page {
|
||||||
background-color: #ccc;
|
background-color: #ccc;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#magazine .loader {
|
#magazine .loader {
|
||||||
background-image: url(https://cdn.jsdelivr.net/gh/Qiu-Weidong/blog/resources/images/loader.gif);
|
background-image: url(https://cdn.jsdelivr.net/gh/Qiu-Weidong/blog/resources/images/loader.gif);
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
|
@ -36,22 +39,25 @@ div.flip-control a {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 238px;
|
top: 238px;
|
||||||
left: 188px;
|
left: 188px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#magazine .odd {
|
#magazine .odd {
|
||||||
background-image: -webkit-linear-gradient(right, #FFF 95%, #ddd 100%);
|
background-image: -webkit-linear-gradient(right, #FFF 95%, #ddd 100%);
|
||||||
background-image: -moz-linear-gradient(right, #FFF 95%, #ddd 100%);
|
background-image: -moz-linear-gradient(right, #FFF 95%, #ddd 100%);
|
||||||
background-image: -o-linear-gradient(right, #FFF 95%, #ddd 100%);
|
background-image: -o-linear-gradient(right, #FFF 95%, #ddd 100%);
|
||||||
background-image: -ms-linear-gradient(right, #FFF 95%, #ddd 100%);
|
background-image: -ms-linear-gradient(right, #FFF 95%, #ddd 100%);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#magazine .even {
|
#magazine .even {
|
||||||
background-image: -webkit-linear-gradient(left, #FFF 95%, #ddd 100%);
|
background-image: -webkit-linear-gradient(left, #FFF 95%, #ddd 100%);
|
||||||
background-image: -moz-linear-gradient(left, #FFF 95%, #ddd 100%);
|
background-image: -moz-linear-gradient(left, #FFF 95%, #ddd 100%);
|
||||||
background-image: -o-linear-gradient(left, #FFF 95%, #ddd 100%);
|
background-image: -o-linear-gradient(left, #FFF 95%, #ddd 100%);
|
||||||
background-image: -ms-linear-gradient(left, #FFF 95%, #ddd 100%);
|
background-image: -ms-linear-gradient(left, #FFF 95%, #ddd 100%);
|
||||||
}
|
}
|
||||||
|
.publication .button-mid {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
@ -169,11 +175,11 @@ div.flip-control a {
|
||||||
$('#magazine').turn('next');
|
$('#magazine').turn('next');
|
||||||
|
|
||||||
});
|
});
|
||||||
$('#prev').click(function(){
|
$('.publication .prev-button').click(function(){
|
||||||
$('#magazine').turn('previous');
|
$('#magazine').turn('previous');
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
$('#next').click(function(){
|
$('.publication .next-button').click(function(){
|
||||||
$('#magazine').turn('next');
|
$('#magazine').turn('next');
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue