html - Background image to fill background when browser fully opened, and crop when closed -


i use image total window background when browser window open using size display.

if browser window made more narrow, left , right sides of image should cropped , scrollbar should not displayed. background-size: cover; seems me close, crops off right side.

how can accomplished?

body {      background-image: url("image.jpg");     background-repeat: no-repeat;     background-size: cover;     background-position: center; } 

centers background image on page.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -