注意:Bootstrap 4。
我有以下页脚(一些与ASP不相关的内容):
<footer class="footer bg-light">
<span class="footer-copyright">
© @DateTime.Now.ToLocalTime().Year - @ApplicationResources.CompanyName
</span>
<span>
@ApplicationResources.Versions: @ApplicationResources.Web @appsettings.WebVersion / @ApplicationResources.Api @appsettings.ApiVersion
</span>
</footer>
版权是合理的(根据我的需要),但是我无法弄清楚如何对版本详细信息(我想要的)进行合理的说明。如果我先进行跨度,div,然后使用“ text-right”,它就可以工作,但是会出现在版权下方的行上,从而使页脚更高(不需要)。“文本权限”对跨度没有影响。
我在网络上找不到单个示例。
另一件事。我发现的一些页脚示例在页脚元素上具有“页面页脚”类,而不仅仅是“页脚”。如果这样做,则页脚将不再停留在页面底部。
如何在与版权相同的行上对版本信息进行右对齐?
您可以通过在页脚中添加名称和类名来使用Flexbox和Bootstrap中的证明内容帮助程序:d-flex
justify-content-between
<footer class="footer bg-light d-flex justify-content-between">
<div class="footer-copyright">
© @DateTime.Now.ToLocalTime().Year - @ApplicationResources.CompanyName
</div>
<div>
@ApplicationResources.Versions: @ApplicationResources.Web @appsettings.WebVersion / @ApplicationResources.Api @appsettings.ApiVersion
</div>
</footer>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句