如何在不中断的情况下证明水平菜单的合理性?

时间:2017-07-18 14:56:54

标签: html css sass menuitem

所以我试图证明一个水平菜单。

它应该是这样的:

enter image description here

所以我尝试了这个:

ul {

    &.nav-fixed {
    list-style: none;
    list-style-image: none;
    margin: 0;
    padding: 0;
    position:  relaiv;
    display: flex;
    justify-content: space-between;
    width: 100%;
    border-collapse: collapse;
    }


    li {
        a {
          display: inline-block;
          margin: 0;
          font-weight: normal;
          color: $red;

        }
    }

}

它有效。一切都是中心,左边或右边没有空格。 我的问题是" First Item"和"最后一项"被打破了。第二个词现在是新的一行。

我不知道如何解决这个问题。我将宽度:100%; 添加到我的li {}中,但不再是中心了。

2 个答案:

答案 0 :(得分:2)

tell application "Finder" to open "Macintosh:Users:Firebird:Documents:ranscript1.rtf" 添加到任何选择器(white-space: nowrapulli),以便将您的字词保留在一行上。

答案 1 :(得分:0)

尝试将white-space: nowrap;添加到li