具有Level 2和Level 3的全宽子菜单

时间:2018-08-24 11:53:39

标签: html5 css3 bootstrap-4

我需要将相同的概念扩展到具有完整背景色的level3子菜单。 Full width css dropdown menu。对于2级和3级,我的CSS就是这样的

.level_3 {
  top: 0;
  left: 100%;
  display: block;
  position: absolute;
  margin: 0 -1000em;
}

.level_2 {
  left: 0;
  top: 100%;
  padding: 0 1000em;
  margin: 0 -1000em;
  z-index: 101;
  background: rgba(255, 240, 240, 0.8);
  li {
    a {
      @include line-height(30px);
      text-transform: none;
    }
  }
}

我需要使level2的高度与level3的高度相同,并且没有最小高度,因为它可以具有任意数量的level3子菜单。这里是我的笔来简要演示:https://codepen.io/anon/pen/VGvqxm

I need the background color to go till the end of submenu level3 as well

0 个答案:

没有答案
相关问题