html - Mobile Safari - Position of Background Images -
after reading through lot of articles have managed narrow down problem. still confused on how resolve issue.
the problem: have index.php file has 8 div boxes called .fillwindow
within these div boxes display different background images & videos.
the website works fine on desktop (window needs around 1680x1050, working on smaller resolutions now). when viewed on iphone there issues when comes fullscreen of imagery. images seem incredibly zoomed in , website unusable. (only on index page, sub pages ok - extent.)
from i've read there seems issues background-size:cover;
, background-attachment:fixed;
mobile ios. experimented background-attachment
set scroll
, background-size
set 100% 100%
did not work either.
i've created in css, media query making video
tags display:none;
, display replacement image if viewport less 768px.
in header.php file i've attached meta tag <meta name="viewport" content="width=device-width, initial-scale=1">
so after fiddling around different values , properties still can not manage find solution.
here link website willing have look. - www.dejavusake.com.au , , here sub page view on mobile compare index.php - www.dejavusake.com.au/portfolio
here section of html markup.
<div class="fillwindow" style="background-image:url('http://dejavusake.com.au/wp-content/uploads/2015/05/moromi_in_clothbag.jpg')"> <div class="landing__logo"> <img class="landing__logo-img" src="http://dejavusake.com.au/wp-content/uploads/2015/04/deja_vu_sake_co_wordmark_rev-01.png"> </div> </div> <div class="fillwindow" id="portfolio" style="background-image:url('http://dejavusake.com.au/wp-content/uploads/2015/05/steamed_rice.jpg')"> <div class="nav-header"> <img src="<?php home_url(); ?>wp-content/themes/dejavu_theme/images/portfolio-01.png"> </div> <a href="<?php home_url(); ?>portfolio" class="js-navbtn"><div class="nav-hitstate"></div></a> <div class="img__description"><i class="fa fa-circle circle-style"></i><p> <span style="color:#00ff00">mushi</span> mai rice steamng, first task each morning</p></div> </div> <div class="fillwindow" id="styles"> <div class="fillwindow-videowrap"> <video class="fillwindow-video" autoplay loop muted poster="<?php home_url(); ?>wp-content/themes/dejavu_theme/images/styles-sml.png"> <source src="http://dejavusake.com.au/wp-content/uploads/2015/06/rice_sorting_compressed.mp4" type="video/mp4" autoplay loop mute /> </video> <img class="sml-replace-img" src="<?php home_url(); ?>wp-content/themes/dejavu_theme/images/styles-sml.png"> </div> <div class="nav-header"> <img src="<?php home_url(); ?>wp-content/themes/dejavu_theme/images/styles-01.png"> </div> <a href="<?php home_url(); ?>styles" class="js-navbtn"><div class="nav-hitstate"></div></a> <div class="img__description"><i class="fa fa-circle circle-style"></i><p> <span style="color:#00ff00">koji room</span> heart of sake brewing process</p></div> </div>
here css:
.fillwindow { height: 100vh; /*outline: 1px solid red;*/ background-color: #000; background-position: center center; background-repeat: no-repeat; background-size: cover; background-attachment: fixed; position: relative; overflow: hidden; }
Comments
Post a Comment