gpt4 book ai didi

javascript - 我在 Bootstrap 3 上的进步

转载 作者:太空宇宙 更新时间:2023-11-04 12:40:17 24 4
gpt4 key购买 nike

我今天早上在这里询问如何开始使用 bootstrap 3,一些好 friend 指导和支持我。

附件是我到目前为止所取得的进步的照片,我知道还有很长的路要走,我还在学习。但是现在,我被困在这个超大屏幕上。我试图使文本和图片水平对齐,但我已经为此奋斗了几个小时。有人可以帮我解决这个问题吗?另外,我想将背景颜色从现在的颜色更改为其他颜色。

抱歉,我刚刚意识到我还没有资格发布和图片。

这是脚本:

 <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">

<title>Jumbotron Template for Bootstrap</title>

<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="jumbotron.css" rel="stylesheet">

<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="../../assets/js/ie-emulation-modes-warning.js"></script>

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>

<body>

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<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="#">Techy Support</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<form class="navbar-form navbar-right" role="form">
<div class="form-group">
<input type="text" placeholder="Email" class="form-control">
</div>
<div class="form-group">
<input type="password" placeholder="Password" class="form-control">
</div>
<button type="submit" class="btn btn-success">Sign in</button>
</form>
</div><!--/.navbar-collapse -->
</div>
</nav>

<!-- Main jumbotron for a primary marketing message or call to action -->
<div id="home-page">
<section class="jumbotron">
<div class="container">
<h1 class="mission-statement">
Making IT at home <br />
Easy and Affordable
<div class="text-right">
<img class="img-rounded" style="width: 200px;" src="bac.jpg" class="img-responsive center-block" />
</div>
</h1>


</div>
</section>
</div>
<!-- <div class="jumbotron">
<div class="container">
<h1>Making IT at home <br> Easy and Affordable!</h1>
<p>This is a template for a simple marketing or informational website. It includes a large callout called a jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
<p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more &raquo;</a></p>
<img class="jumbotron-image hidden-sm hidden-xs hidden-md" src="bac.jpg" />

</div>
</div> -->

<div class="container">
<!-- Example row of columns -->
<div class="row">
<div class="col-md-4">
<h2>Heading</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
<p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p>
</div>
<div class="col-md-4">
<h2>Heading</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
<p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p>
</div>
<div class="col-md-4">
<h2>Heading</h2>
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
<p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p>
</div>
</div>

<hr>

<footer>
<p>&copy; Company 2014</p>
</footer>
</div> <!-- /container -->


<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>

我相信有些人会理解我面临的挑战。

谢谢

最佳答案

您可以使用 bootstrap 为您的布局提供的 col-**-* 类。对于背景颜色,请将 background-color 样式应用于您的超大屏幕元素。

<div id="home-page">
<section class="jumbotron" style="background-color:#336699">
<div class="container">
<div class="col-xs-6">
<h1 class="mission-statement">
Making IT at home <br />
Easy and Affordable
</h1>
</div>
<div class="col-xs-6">
<img class="img-rounded" style="width: 200px;" src="mac.jpg" class="img-responsive center-block" />
</div>
</div>
</section>
</div>

http://jsfiddle.net/d5x2ho7r/1/

关于javascript - 我在 Bootstrap 3 上的进步,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26934989/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com