Css 蚂蚁设计抽屉头固定
我正在使用我的react项目进行,我有一些冲突,我尝试使用以下CSS命令修复抽屉标题Css 蚂蚁设计抽屉头固定,css,antd,Css,Antd,我正在使用我的react项目进行,我有一些冲突,我尝试使用以下CSS命令修复抽屉标题position:fixed,但它没有出现,有人知道一些解决方案吗 我的代码 .ant-drawer-header { position: relative; padding: 16px 24px; color: rgba(0, 0, 0, 0.65); background: #fff; position:fixed; border-bottom: 1px sol
position:fixed
,但它没有出现,有人知道一些解决方案吗
我的代码
.ant-drawer-header {
position: relative;
padding: 16px 24px;
color: rgba(0, 0, 0, 0.65);
background: #fff;
position:fixed;
border-bottom: 1px solid #e8e8e8;
border-radius: 4px 4px 0 0;
}
谢谢听听解决方案
.ant-drawer-header {
position: absolute;
padding: 16px 24px;
z-index: 99999;
color: rgba(0, 0, 0, 0.65);
background: #fff;
top: 0;
left: 0;
right: 0;
border-bottom: 1px solid #e8e8e8;
border-radius: 4px 4px 0 0;
}
.ant-drawer-body {
padding: 24px;
margin-top: 3rem;
font-size: 14px;
line-height: 1.5;
word-wrap: break-word;
}
标题默认情况下是固定的,您不需要添加位置固定。@FatemehQasemkhani您好,不,当我滚动抽屉时,我的标题是隐藏的,以便在沙箱或其他地方共享您的代码,并且在您的css样式中添加了相对和固定。为什么?如果你想添加固定位置,你也应该添加100%