javascript - Background Postioning in CSS on Mobile Device -
i have image (background.jpg) on website. appears fine on desktop, doesn't right on mobile. change in stylesheet.css make image, guess, shrink in size appear desktop?
current code:
#services-top-desktop {     background: #fff url(../img/background.jpg) fixed no-repeat center;     background-size: cover; }  #services-top-mobile {     background: #fff url(../img/background.jpg) no-repeat center; } 
your code uses 2 classes, 1 desktop , other mobile. instead, use generic body class in css
body {    background-image: url('../img/test.jpg');   background-repeat: no-repeat;   background-size: cover;  } 
Comments
Post a Comment