更改“自定义部分”侧边栏的位置

可以吗?我尝试了以下方法,但仍然无效:


我尝试用 CSS 来实现,但仍然无效,有人能帮帮我吗?

.sidebar-section-wrapper.sidebar-section[data-section-name="buythebookhere"] {
  order: 1;
}
.sidebar-section-wrapper.sidebar-section[data-section-name="reviews-of-customers"] {
  order: 2;
}
.sidebar-section-wrapper.sidebar-section[data-section-name="categories"] {
  order: 3;
}
.sidebar-section-wrapper.sidebar-section[data-section-name="tags"] {
  order: 4;
}
.sidebar-section-wrapper.sidebar-section[data-section-name="justbehappy"] {
  order: 5;
}
.sidebar-section-wrapper.sidebar-section[data-section-name="messages"] {
  order: 6;
}

.sidebar-section-wrapper.sidebar-section[data-section-name="chat-channels"] {
  order: 7;
}

.sidebar-section-wrapper.sidebar-section[data-section-name="chat-dms"] {
  order: 8;
}

2 个赞

根据您希望的区块顺序,您可以执行类似以下操作:

.sidebar-wrapper { 
  .sidebar-custom-sections {
    display: contents;
  } 
  [data-section-name="tags"] {
    order: -3;
  }
  [data-section-name="categories"] {
    order: -2;
  }
  [data-section-name="custom-section-title-here"] {
     order: -1;
  }
}
3 个赞

@Lilly 在桌面端可以正常工作,但在移动端不行,我该如何为移动端进行设置?

1 个赞

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.