Tako
Tako

Reputation: 11

I want to show background-image in full screen

My question is about "background-image" in CSS. How can I add "background-image" in full screen? I used "width: 100% " but it doesn't work.

Upvotes: 0

Views: 1861

Answers (2)

Imtango30
Imtango30

Reputation: 243

     body {
     background: url(http://i.imgur.com/aZO5Kolb.jpg) no-repeat center center fixed; 
     -webkit-background-size: cover;
     -moz-background-size: cover;
     -o-background-size: cover;
     background-size: cover;
     background-size: 100% 100%;
}
     html {
      height: 100%
     }

Upvotes: 0

Farhad Bagherlo
Farhad Bagherlo

Reputation: 6699

html,body{
 height: 100%;
}
body{ 
 background-image:url(http://www.cutestpaw.com/wp-content/uploads/2016/02/s-Yoshi-The-Seal-Kitteh.jpg);
 background-position: center center;
 background-repeat:  no-repeat;
 background-attachment: fixed;
 background-size:  cover;
}

Upvotes: 1

Related Questions