gpt4 book ai didi

html - 使用 materializecss 时导航栏无法正确调整大小

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

我正在关注 http://materializecss.com/navbar.html 上的示例,我的代码是这样的:

<div class="navbar-fixed">
<nav>
<div class="nav-wrapper">
<a href="#!" class="brand-logo center">Logo</a>
<a href="#" data-activates="mobile-demo" class="button-collapse"><i class="material-icons">menu</i></a>
<ul class="left">
<li><a href="sass.html">About Us</a></li>
<li><a href="badges.html">Services</a></li>
</ul>
<ul class="right">
<li><a href="sass.html">Testimonials</a></li>
<li><a href="badges.html">Contact Us</a></li>
</ul>

<ul class="side-nav" id="mobile-demo">
<li><a href="sass.html">Sass</a></li>
<li><a href="badges.html">Components</a></li>
<li><a href="collapsible.html">Javascript</a></li>
<li><a href="mobile.html">Mobile</a></li>
</ul>
</div>
</nav>
</div>
看起来像这样: fullpage screen capture但是当窗口/网页变小时,导航内容就乱七八糟了,像这样: reduce nav image我做错了什么?请帮忙

最佳答案

<div class="navbar-fixed">
<nav>
<div class="nav-wrapper">
<a href="#!" class="brand-logo center">Logo</a>
<a href="#" data-activates="mobile-demo" class="button-collapse"><i class="material-icons">menu</i></a>
<ul class="left hide-on-med-and-down">
<li><a href="sass.html">About Us</a></li>
<li><a href="badges.html">Services</a></li>
</ul>
<ul class="right hide-on-med-and-down">
<li><a href="sass.html">Testimonials</a></li>
<li><a href="badges.html">Contact Us</a></li>
</ul>

<ul class="side-nav" id="mobile-demo">
<li><a href="sass.html">Sass</a></li>
<li><a href="badges.html">Components</a></li>
<li><a href="collapsible.html">Javascript</a></li>
<li><a href="mobile.html">Mobile</a></li>
</ul>
</div>
</nav>

关于html - 使用 materializecss 时导航栏无法正确调整大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44281139/

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