ITbug
ITbug

Reputation: 45

Iphone CSS issue for mobile view only

Unable to detect css in mobile view for iphone in real device, it works fine in browser responsive test emulator for mobile view, it also looks better in android phones but not in iphone device

this is output of responsive tabs

Upvotes: 1

Views: 543

Answers (2)

Kumar Jeya
Kumar Jeya

Reputation: 1

 html 
 {
     background: url(your image source)
     no-repeat 
     center center fixed;
     background-size: cover;
     height: 100%;
     overflow: hidden;
 }
 body
 {
      height:100%;
      overflow: scroll;
      -webkit-overflow-scrolling: touch;
 } 

Reference :https://css-tricks.com/forums/topic/full-page-backgrounds-on-ios-background-size-cover/page/2/

Upvotes: 0

bviale
bviale

Reputation: 5375

To have a responsive bootstrap on mobile devices, ensure you have the <meta> viewport tag in your <head> :

<meta name="viewport" content="width=device-width, initial-scale=1">

Explanation here

Upvotes: 2

Related Questions