gpt4 book ai didi

html - 在 Bootstrap 中使用词缀的导航列表之后的图像

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

我正在尝试将图像附加到导航列表的底部,并在页面滚动时让它停留在那里。

这就是我想要的:

enter image description here

这是词缀开始时我得到的:

enter image description here

我需要它保持图片一的状态。我尝试用谷歌搜索问题并搜索堆栈溢出但没有结果。

代码如下:

<!--SIDEBAR NAVIGATION -->
<ul class="nav nav-list well hidden-phone hidden-tablet" data-spy="affix" data-offset-top="850">
<li class="nav-header">The Green Panda</li>
<li class="divider"></li>
<li><a href="#whatwedo">What We Do</a></li>
<li class="divider"></li>
<li><a href="#oursolutions">Our Solutions</a></li>
<li class="divider"></li>
<li><a href="#morethanwebdesign">More Than Web Design</a></li>
<li class="divider"></li>
<li><a href="#contactinfo">Contacting Us</a></li>
</ul>
<img src="img/woody-effect.png" class="img-bottom nav-list" data-spy="affix" data-offset-top="850">

最佳答案

编辑:

选择器不正确。

如果菜单的高度是静态的,您可以在切换到固定样式时向该图像添加一个类并应用此 css:

top: 310px;

这会将其置于菜单底部。

我会在 .affix 下设置一个类并将其应用于您的图像(添加 id panda_logo)

#panda_logo.affix {
top: 310px
}

关于html - 在 Bootstrap 中使用词缀的导航列表之后的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16597461/

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