Контейнер Bootstrap не отображается с фактическим размером, когда я добавляю исходный код в ASP.NET проект MVC
Я пытаюсь создать демонстрационный html-код, как показано ниже.
<!DOCTYPE html> <html lang=""> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Title Page</title> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <h1 class="text-center">Hello World</h1> <!-- jQuery --> <script src="//code.jquery.com/jquery.js"></script> <!-- Bootstrap JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> <!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> <script src="Hello World"></script> <div class="container"> Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aspernatur possimus dolor fuga sapiente, iusto accusantium sed, beatae incidunt doloremque facilis in perspiciatis neque iure libero assumenda sequi ea obcaecati. </div> </body> </html>
It's showed with real width: 1170px. https://gyazo.com/0e13b41b6c619b8efb7a26e2e1b87922 But, when I try adding into view (_Layout.cshtml) in ASP.NET MVC project. Container's width looks like smaller than 1170px. https://gyazo.com/9fe838a4a0ed22f47eb0a96986747e83 Thanks for helping (bow)
Что я уже пробовал:
Я попытался добавить ниже css, но это не сработало для меня.
. контейнер-полный {
маржа: 0 авто;
ширина: 100%;
}