如何制作jumbotron规模

时间:2017-12-07 01:01:27

标签: html css

尝试使jumbotron规模如此响应。我是bootstrap和css / html的新手。当我改变我的屏幕尺寸时,在jumbotron和导航之间似乎有很多白色间距。

导航应该是透明的,但我不认为它显示为不链接到bootstrap cdn



.navbar-default{
    background-color: rgba(0,0,0,0.3);
	border: none;
	height: 100%;
	margin:0;
	border-bottom: 1px solid #2b2b2b;
}

.jumbotron {
	background: url('squirrel.jpg') no-repeat;
	background: cover;
	background-size: 100%;
	height: 600px;
	margin-top:-50px;
    background-position: 75% 62%;
}


.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:focus, .navbar-default .navbar-nav>.active>a:hover {
	background:none;
	color: #777;
}

.navbar-default .navbar-nav>li>a {
	color: red;
	font-size: 1.1em;
	color: white;

}

<!DOCTYPE html>
<html>
<head>
	<title>Image Site</title>

	<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

  	<script src="https://code.jquery.com/jquery-3.2.1.js"></script>

	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

	<link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc2/css/bootstrap-glyphicons.css">

	<link rel="stylesheet" type="text/css" href="styles.css">

	<script src="https://use.fontawesome.com/428778f25c.js"></script>
</head>
<body>

	<nav class="navbar navbar-default">
  <div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">Brand</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
        <li><a href="#">Link</a></li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <li><a href="#">Link</a></li>
       
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->

</nav>

<div class="jumbotron">
	<div class="container"></div>
</div>
</body>
</html>
&#13;
&#13;
&#13;

0 个答案:

没有答案