0

I have this img set as background to a div. But is too big for my liking. Is there a way I could resize it in css ?

.portfolio {
    width: 100%;
    height: 100vh;
    background-image: url('img/img2.jpg');
    background-position: center;
    background-size: cover;
}
HHH
  • 11
  • 4

1 Answers1

0

Surely you can do this with two methods. First is by giving background-size: auto; Second is by giving custome size like background-size: 500px 200px;

This will solve your problem. :)

Arjun
  • 1,294
  • 13
  • 24
  • Thnks ! Can I ask you something because I cant pots only in 30min . HTML scroll-behavior does't work on Edge ? – HHH May 28 '19 at 12:54
  • Scroll-behaviour is not supported in edge I guess.It works only in chrome,opera and Mozilla – Arjun May 28 '19 at 12:56