css - Position fixed is not working on ipad -


i trying fix background of website , have place div "bgdiv" on website having position fixed. working on desktop. on ipad position fixed not working scrolls whole website. , background image repeating. there way avoid scrolling bgdiv.

 .bgdiv{     background: url("test.jpg") repeat scroll 0 0 transparent;     background-size: 100% 100%;     bottom: 0;     left: 0;     position: fixed;     right: 0;     top: 0;     z-index: -2;     height: inherit;     }  <body>   <div class="bgdiv"></div>      <div class="wrapper">           content       </div> </body> 

update css this,

.bgdiv{     background: url("test.jpg") repeat scroll 0 0 transparent;     background-size: 100% 100%;     left: 0;     position: fixed;     top: 0;     z-index: -2;     height: auto;     width:100%;  } 

if not added, add code above,

 <meta name="viewport" content="width=device-width, user-scalable=no" /> 

you can refer documentation:- http://www.quirksmode.org/blog/archives/2010/12/the_fifth_posit.html


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -