html - 标题/部分粘贴到页面顶部
问题描述
无论我尝试什么,我都无法让我的标题部分粘在页面顶部!
.cluster-padding-large {
padding: 30px 1.28%;
}
.flex-row {
display: flex !important;
/* box-sizing: border-box; */
/* display: flex; */
flex: 0 1 auto;
flex-direction: row;
flex-wrap: wrap;
margin-right: -15px;
margin-left: -15px;
}
<section class="zpa-container zp ba-25443645">
<div class="js-cluster zpa-cluster-padding-none cluster-padding-large zp cac-25443645">
<div class="flex-row middle-sm zpa-mobile-navigation-wrapper">
<div class="xs-12 sm-2 zpa-navbar-order">
<div class="zpa-voffset--xs zpa-mobile-align--center zpa-align--center zpa-image-max-width--xlarge zp ba-25443642" data-id="25443642">
<a class="zpa-disabled-when-link-empty" href="https://123.com" target="_self" data-type="custom_dest"> <img style="max-height: 45px;" src="{{ 'bae_babeLogo.png' | asset_url }}" alt="Logo" </a></div>
</div>
<div class="xs-12 sm-7 zpa-mobile-row-offset-none zpa-text-center">
<div class="zpa-navigation-main-box"><label class="zpa-navbar-label zp lat-25443643" for="nav_5722335"> <svg class="zpa-icon-currentcolor zpa-navgation-icon" width="24px" height="24px"> <use xlink:href="#navbar-icon"></use> </svg> <span class="zpa-navbar-menu-title zpa-tablet-offset-left-xs">MENU</span> </label></div>
<input type="checkbox" name="navigation button" id="nav_5722335" class="zpa-navigation-toggle hidden">
<div class="zpa-navigation-list__wrap zpa-navigation-list-wrap-btn zpa-mobile-offset-right-xs">
<ul class="zpa-list-unstyled zpa-navigation-list zp ba-25443643" data-id="25443643">
<li class="zpa-navigation-list-item"><a class="zpa-navigation-list-link zp lat-25443643" href="#5722351" target="_self" title="Reviews"> Reviews </a></li>
<li class="zpa-navigation-list-item"><a class="zpa-navigation-list-link zp lat-25443643" href="#5722358" target="_self" title="FAQ"> FAQ </a></li>
<li class="zpa-navigation-list-item"><a class="zpa-navigation-list-link zp lat-25443643" href="#5722356" target="_self" title="Portable Mini Air Conditioner MAX™"> 123™ </a></li>
</ul>
</div>
</div>
<div class="xs-12 sm-3 zpa-mobile-absolute-position zpa-mobile-wrap-btn-cart center-xs">
<div class="flex-grow-1 zpa-mobile-btn-center zpa-text-center-sm zpa-button-alignment-center"><a class="zpa-btn-custom zpa-mobile-btn-size zpa-button-padding-medium zp ba-25443644" data-id="25443644" href="#5722356" data-type="cluster_dest" target="_self" role="button"> ADD TO CART </a></div>
</div>
</div>
</div>
</section>
选项卡选项列表在此部分和“flex-row”中,其中包含用于对齐元素的 css,问题是,无论我尝试什么,无论是位置:粘性,在具有内联样式或任何内容的部分,或者'最佳; 0' 根本没有任何工作。我错过了一些明显的东西吗?
解决方案
使用 position: fixed in css 使某些东西留在页面上
推荐阅读
- wordpress - RewriteRule 当替换字符串不是文件路径而是应该由下一个规则处理的 URL 时
- public-key-encryption - 如何使用命令行使用 PGP 制作和验证签名
- string - 如何在 Powerhsell 中定义同时包含符号双引号和单引号的字符串?
- r - 如何使用数据框中每个日期的特定间隔计算截距和贝塔
- css - 对齐 ant 设计表的列和行
- oracle - 更改语句数据类型更新需要很长时间
- azure - 使用 PowerShell 锁定 Azure 资源
- android - 使用导航组件将参数传递给嵌套图的问题
- android - 一段时间后,sockets.io 没有收到任何进一步的发射?
- android - 如果应用程序在前台并收到推送通知,则不打开生物识别提示