+ 2

How to get a Full Screen Background Image ?

When i set any Hd photo in the Background , it shows only Top Left corner of the photo and not the Whole Picture :/ Any Suggestions ?

19th Jan 2017, 7:46 AM
Shahbaz Tariq
Shahbaz Tariq - avatar
3 Respostas
+ 6
You can set background-size property with two special values ( in addition to absolute and relative common units ) as 'cover' and 'contain'. They allow to define a "responsive" size. First is cropped if necessary to fill all the available space, the second to avoid crop with mawimized size... I don't think vendor's prefix are necessary, and you probably could set only 'background-size:cover;' as css rule ;)
19th Jan 2017, 9:56 AM
visph
visph - avatar
+ 5
You can use below css code to set the background with full size html { background: url(images/bg.jpg) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; }
19th Jan 2017, 8:10 AM
Hoang Tran Thanh Tu
Hoang Tran Thanh Tu - avatar
+ 2
Thanks both :) will try ^_^
20th Jan 2017, 2:36 PM
Shahbaz Tariq
Shahbaz Tariq - avatar