页面样式修改
This commit is contained in:
parent
1a75a8b025
commit
ca7bc4a1ce
|
|
@ -180,6 +180,7 @@ export default {
|
|||
for (let pageNumber = 1; pageNumber <= this.totalPages; pageNumber += 1) {
|
||||
const placeholder = document.createElement('div')
|
||||
placeholder.className = 'pdf-page placeholder'
|
||||
placeholder.style.margin = '0px auto 10px'
|
||||
placeholder.dataset.page = pageNumber
|
||||
placeholder.dataset.status = 'placeholder'
|
||||
fragment.appendChild(placeholder)
|
||||
|
|
@ -202,6 +203,7 @@ export default {
|
|||
|
||||
container.style.width = `${viewport.width}px`
|
||||
container.style.height = `${viewport.height}px`
|
||||
container.style.margin = '0px auto 10px'
|
||||
if (!container.dataset.status || container.dataset.status === 'placeholder') {
|
||||
container.dataset.status = 'prefetched'
|
||||
}
|
||||
|
|
@ -730,9 +732,7 @@ export default {
|
|||
|
||||
.pdf-page {
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
margin-top: 18px;
|
||||
margin-bottom: 18px;
|
||||
margin: 0px auto 10px !important;
|
||||
box-shadow: 0 10px 30px rgba(25, 64, 158, 0.12);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
|
|
@ -742,12 +742,30 @@ export default {
|
|||
justify-content: center;
|
||||
}
|
||||
|
||||
.pdf-page:first-of-type {
|
||||
margin-top: 0;
|
||||
.pdf-page:first-of-type::before,
|
||||
.pdf-page:last-of-type::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pdf-page:not(:last-of-type) {
|
||||
margin-bottom: 26px;
|
||||
.pdf-page::before,
|
||||
.pdf-page::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 5%;
|
||||
right: 5%;
|
||||
height: 12px;
|
||||
height: 8px;
|
||||
border-radius: 6px;
|
||||
background: linear-gradient(180deg, rgba(206, 216, 232, 0.65) 0%, rgba(208, 216, 230, 0.25) 100%);
|
||||
box-shadow: 0 2px 6px rgba(102, 125, 160, 0.25);
|
||||
}
|
||||
|
||||
.pdf-page::before {
|
||||
top: -20px;
|
||||
}
|
||||
|
||||
.pdf-page::after {
|
||||
bottom: -28px;
|
||||
}
|
||||
|
||||
.pdf-page.placeholder {
|
||||
|
|
|
|||
Loading…
Reference in New Issue