C
C
connor742015-12-06 18:52:22
css
connor74, 2015-12-06 18:52:22

How to make a responsive background image with Bootstrap 3?

Good evening!
I can't solve the problem. I make a page using BS3:

<!DOCTYPE html>
<html lang="ru">
<head>...</head>
  <body>
    <nav class="navbar navbar-default navbar-fixed-top">
    ...
    </nav>
    <div class="container">

      <div class="row">
        <div class="col-md-12 main-top">
        </div>
      </div>
     .... <!-- Контент-->
    </div>

It is necessary to make a background image in div.main-top, which is pressed to the navigation bar and after it comes the content.
Please tell me a cross-browser solution, in which the image size will change depending on the size of the screen.
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2015-12-06
@gangstarcj

backgrouud-size: cover

M
Maxim Timofeev, 2015-12-06
@webinar

backround-size:cover;
or
backround-size:contain;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question