mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
fix width and height of iframes for mobile sized browsers
This commit is contained in:
parent
a2180ce924
commit
96ada6783b
4 changed files with 71 additions and 38 deletions
|
@ -103,9 +103,10 @@ body {
|
||||||
max-width: 1250px;
|
max-width: 1250px;
|
||||||
/* z-index: 2;
|
/* z-index: 2;
|
||||||
position: absolute; */
|
position: absolute; */
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#viewer iframe {
|
#viewer #epubjs-iframe {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -659,7 +660,37 @@ input:-moz-placeholder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[class^="icon-"]:before, [class*=" icon-"]:before {
|
|
||||||
|
/* For iPad portrait layouts only */
|
||||||
|
@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: portrait) {
|
||||||
|
#viewer #epubjs-iframe {
|
||||||
|
width: 460px;
|
||||||
|
height: 740px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*For iPad landscape layouts only */
|
||||||
|
@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: landscape) {
|
||||||
|
#viewer #epubjs-iframe {
|
||||||
|
width: 460px;
|
||||||
|
height: 415px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* For iPhone portrait layouts only */
|
||||||
|
@media only screen and (max-device-width: 480px) and (orientation: portrait) {
|
||||||
|
#viewer #epubjs-iframe {
|
||||||
|
width: 256px;
|
||||||
|
height: 368px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* For iPhone landscape layouts only */
|
||||||
|
@media only screen and (max-device-width: 480px) and (orientation: landscape) {
|
||||||
|
#viewer #epubjs-iframe {
|
||||||
|
width: 256px;
|
||||||
|
height: 124px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[class^="icon-"]:before, [class*=" icon-"]:before {
|
||||||
font-family: "fontello";
|
font-family: "fontello";
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
@ -678,7 +709,7 @@ input:-moz-placeholder {
|
||||||
|
|
||||||
/* you can be more comfortable with increased icons size */
|
/* you can be more comfortable with increased icons size */
|
||||||
font-size: 112%;
|
font-size: 112%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.icon-search:before { content: '\e807'; } /* '' */
|
.icon-search:before { content: '\e807'; } /* '' */
|
||||||
|
@ -703,3 +734,4 @@ input:-moz-placeholder {
|
||||||
.icon-columns:before { content: '\e810'; } /* '' */
|
.icon-columns:before { content: '\e810'; } /* '' */
|
||||||
.icon-list:before { content: '\e800'; } /* '' */
|
.icon-list:before { content: '\e800'; } /* '' */
|
||||||
.icon-resize-small:before { content: '\e808'; } /* '' */
|
.icon-resize-small:before { content: '\e808'; } /* '' */
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
<title></title>
|
<title></title>
|
||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
|
||||||
<link rel="stylesheet" href="../demo/css/normalize.css">
|
<link rel="stylesheet" href="../demo/css/normalize.css">
|
||||||
|
|
|
@ -42,6 +42,7 @@ EPUBJS.reader.ControlsController = function(book) {
|
||||||
screenfull.toggle($('#container')[0]);
|
screenfull.toggle($('#container')[0]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(screenfull) {
|
||||||
document.addEventListener(screenfull.raw.fullscreenchange, function() {
|
document.addEventListener(screenfull.raw.fullscreenchange, function() {
|
||||||
fullscreen = screenfull.isFullscreen;
|
fullscreen = screenfull.isFullscreen;
|
||||||
if(fullscreen) {
|
if(fullscreen) {
|
||||||
|
@ -54,7 +55,7 @@ EPUBJS.reader.ControlsController = function(book) {
|
||||||
.removeClass("icon-resize-small");
|
.removeClass("icon-resize-small");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
$settings.on("click", function() {
|
$settings.on("click", function() {
|
||||||
reader.SettingsController.show();
|
reader.SettingsController.show();
|
||||||
|
|
|
@ -57,7 +57,7 @@ EPUBJS.Reader = function(path, _options) {
|
||||||
reload: this.settings.reload,
|
reload: this.settings.reload,
|
||||||
contained: this.settings.contained,
|
contained: this.settings.contained,
|
||||||
bookKey: this.settings.bookKey,
|
bookKey: this.settings.bookKey,
|
||||||
styles: this.settings.styles
|
styles: this.settings.styles,
|
||||||
});
|
});
|
||||||
|
|
||||||
if(this.settings.previousLocationCfi) {
|
if(this.settings.previousLocationCfi) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue