gpt4 book ai didi

css - 如何在 mvc bootstrap 中自定义导航栏(宽度)

转载 作者:太空宇宙 更新时间:2023-11-04 11:37:10 25 4
gpt4 key购买 nike

我想将导航栏自定义为与下面的容器大小相同:

<div class="container jumbotron row col-sm-12" style="width: 100%; margin: 0px auto;">
<h1>ASP.NET</h1>
<p class="lead">ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.</p>
<p><a href="http://asp.net" class="btn btn-primary btn-lg">Learn more &raquo;</a></p>
</div>

我已经尝试了所有方法,更改了每个 div,但这些都不起作用,所以我想知道我做错了什么。

图片准确说明我的意思: enter image description here

最佳答案

您可以使用容器类将您的代码包装在一个 div 中:

Bootply Link

<div class="container">
<div class="container jumbotron row col-sm-12" style="width: 100%; margin: 0px auto;">
<h1>ASP.NET</h1>
<p class="lead">ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.</p>
<p><a href="http://asp.net" class="btn btn-primary btn-lg">Learn more »</a></p>
</div>
</div>

关于css - 如何在 mvc bootstrap 中自定义导航栏(宽度),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31653154/

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