Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 蚂蚁设计抽屉头固定_Css_Antd - Fatal编程技术网

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

我正在使用我的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 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%