THIS SHOULD BE ONLY DISPLAYED ON MOBILE PHONES -6ren">
gpt4 book ai didi

html - 具有 Bootstrap 类 "d-sm-none"的 div 显示在每个屏幕尺寸上

转载 作者:行者123 更新时间:2023-11-28 00:12:06 25 4
gpt4 key购买 nike

我写了这个标记:

<nav class="navbar navbar-expand-lg">
<a class="navbar-brand overflow-hidden pr-3" href="@Url.Action("Index","Home")">
<!--<img src="~/Content/Theme/images/logo-dark.png" alt="" />-->
<img src="~/Content/Theme/images/Velosi/applusLogo.jpg" style="height:50px" alt="" />
</a>

<div class="d-sm-none">
<h3>THIS SHOULD BE ONLY DISPLAYED ON MOBILE PHONES</h3>
</div>

<button class="navbar-toggler" type="button" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<div class="hamburger hamburger--emphatic">
<div class="hamburger-box">
<div class="hamburger-inner"></div>
</div>
</div>
</button>

我期待

<div class="d-sm-none">
<h3>THIS SHOULD BE ONLY DISPLAYED ON MOBILE PHONES</h3>
</div>

只显示在手机上,不会超出手机,但它会显示在所有屏幕尺寸上。这是为什么?

最佳答案

试试这个:

<div class="d-none d-sm-none d-md-block">

关于html - 具有 Bootstrap 类 "d-sm-none"的 div 显示在每个屏幕尺寸上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55331468/

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