pdf.js/examples/mobile-viewer/viewer.css

268 lines
5.0 KiB
CSS
Raw Normal View History

/* Copyright 2016 Mozilla Foundation
2012-11-30 10:01:51 +09:00
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* {
padding: 0;
margin: 0;
}
html {
height: 100%;
width: 100%;
overflow: hidden;
font-size: 10px;
}
header {
background-color: rgba(244, 244, 244, 1);
}
header h1 {
border-bottom: 1px solid rgba(216, 216, 216, 1);
color: rgba(133, 133, 133, 1);
font-size: 23px;
font-style: italic;
font-weight: normal;
overflow: hidden;
padding: 10px;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
}
2012-11-30 10:01:51 +09:00
body {
background: url(images/document_bg.png);
color: rgba(255, 255, 255, 1);
2013-08-05 11:55:37 +09:00
font-family: sans-serif;
2012-11-30 10:01:51 +09:00
font-size: 10px;
height: 100%;
width: 100%;
overflow: hidden;
padding-bottom: 5rem;
2012-11-30 10:01:51 +09:00
}
section {
position: absolute;
top: 0;
left: 0;
2012-11-30 10:01:51 +09:00
width: 100%;
height: 100%;
overflow: hidden;
font-size: 2rem;
2012-11-30 10:01:51 +09:00
}
footer {
background-image: url(images/toolbar_background.png);
height: 4rem;
2012-11-30 10:01:51 +09:00
position: absolute;
bottom: 0;
left: 0;
right: 0;
z-index: 1;
box-shadow: 0 -0.2rem 0.5rem rgba(50, 50, 50, 0.75);
2012-11-30 10:01:51 +09:00
}
.toolbarButton {
display: block;
padding: 0;
margin: 0;
border-width: 0;
background-position: center center;
background-repeat: no-repeat;
background-color: rgba(0, 0, 0, 0);
2012-11-30 10:01:51 +09:00
}
.toolbarButton.pageUp {
position: absolute;
width: 18%;
height: 100%;
left: 0;
background-image: url(images/icon_previous_page.png);
background-size: 2rem;
2012-11-30 10:01:51 +09:00
}
.toolbarButton.pageDown {
position: absolute;
width: 18%;
height: 100%;
left: 18%;
background-image: url(images/icon_next_page.png);
background-size: 2rem;
2012-11-30 10:01:51 +09:00
}
#pageNumber {
-moz-appearance: textfield; /* hides the spinner in moz */
2012-11-30 10:01:51 +09:00
position: absolute;
width: 28%;
height: 100%;
left: 36%;
text-align: center;
border: 0;
background-color: rgba(0, 0, 0, 0);
font-size: 1.2rem;
color: rgba(255, 255, 255, 1);
background-image: url(images/div_line_left.png),
url(images/div_line_right.png);
2012-11-30 10:01:51 +09:00
background-repeat: no-repeat;
background-position: left, right;
background-size: 0.2rem, 0.2rem;
2012-11-30 10:01:51 +09:00
}
.toolbarButton.zoomOut {
position: absolute;
width: 18%;
height: 100%;
left: 64%;
background-image: url(images/icon_zoom_out.png);
background-size: 2.4rem;
2012-11-30 10:01:51 +09:00
}
.toolbarButton.zoomIn {
position: absolute;
width: 18%;
height: 100%;
left: 82%;
background-image: url(images/icon_zoom_in.png);
background-size: 2.4rem;
2012-11-30 10:01:51 +09:00
}
.toolbarButton[disabled] {
opacity: 0.3;
2012-11-30 10:01:51 +09:00
}
.hidden {
display: none;
}
[hidden] {
display: none !important;
}
#viewerContainer {
position: absolute;
overflow: auto;
width: 100%;
top: 5rem;
bottom: 4rem;
2012-11-30 10:01:51 +09:00
left: 0;
right: 0;
}
canvas {
margin: auto;
display: block;
}
.pdfViewer .page .loadingIcon {
2012-11-30 10:01:51 +09:00
width: 2.9rem;
height: 2.9rem;
background: url("images/spinner.png") no-repeat left top / 38rem;
2012-11-30 10:01:51 +09:00
border: medium none;
animation: 1s steps(10, end) 0s normal none infinite moveDefault;
display: block;
position: absolute;
top: calc((100% - 2.9rem) / 2);
left: calc((100% - 2.9rem) / 2);
}
@keyframes moveDefault {
from {
background-position: 0 top;
}
to {
background-position: -39rem top;
2012-11-30 10:01:51 +09:00
}
}
#loadingBar {
position: relative;
height: 0.6rem;
background-color: rgba(51, 51, 51, 1);
border-bottom: 1px solid rgba(51, 51, 51, 1);
margin-top: 5rem;
2012-11-30 10:01:51 +09:00
}
#loadingBar .progress {
position: absolute;
left: 0;
2014-03-14 09:16:25 +09:00
width: 0;
2012-11-30 10:01:51 +09:00
height: 100%;
background-color: rgba(221, 221, 221, 1);
overflow: hidden;
transition: width 200ms;
2012-11-30 10:01:51 +09:00
}
@keyframes progressIndeterminate {
0% {
left: 0;
}
50% {
left: 100%;
}
100% {
left: 100%;
}
2012-11-30 10:01:51 +09:00
}
#loadingBar .progress.indeterminate {
background-color: rgba(153, 153, 153, 1);
transition: none;
}
#loadingBar .indeterminate .glimmer {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 5rem;
background-image: linear-gradient(
to right,
rgba(153, 153, 153, 1) 0%,
rgba(255, 255, 255, 1) 50%,
rgba(153, 153, 153, 1) 100%
);
2014-03-14 09:16:25 +09:00
background-size: 100% 100%;
background-repeat: no-repeat;
animation: progressIndeterminate 2s linear infinite;
}
2012-11-30 10:01:51 +09:00
#errorWrapper {
background: none repeat scroll 0 0 rgba(255, 85, 85, 1);
color: rgba(255, 255, 255, 1);
2012-11-30 10:01:51 +09:00
left: 0;
position: absolute;
right: 0;
top: 3.2rem;
2012-11-30 10:01:51 +09:00
z-index: 1000;
padding: 0.3rem;
2012-11-30 10:01:51 +09:00
font-size: 0.8em;
}
#errorMessageLeft {
float: left;
}
#errorMessageRight {
float: right;
}
#errorMoreInfo {
background-color: rgba(255, 255, 255, 1);
color: rgba(0, 0, 0, 1);
padding: 0.3rem;
margin: 0.3rem;
2012-11-30 10:01:51 +09:00
width: 98%;
}