.container .menu-navigation-icons {
    margin-top: -140px;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    font-size:0;
}

.menu-navigation-icons a {
    display: inline-block;
    color: #ffffff;
    background-color: #232526;
    font-size: 40px;
    font-weight: bold;
    box-shadow: 1px 2px 1px 0 rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    width: 136px;
    height: 109px;
}

.menu-navigation-icons a:hover{
    opacity:0.92;
}

.menu-navigation-icons a i {
    display: block;
    line-height: 2;
}

.menu-navigation-icons a span {
    display: block;
    font-size: 11px;
    font-weight: bold;
    line-height: 0;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

/* Menu colors */

.menu-navigation-icons a.menu-genta   { background-color: #dc68bf; }
.menu-navigation-icons a.menu-magenta i { color: #9d518a; }

.menu-navigation-icons a.menu-blue      { background-color: #57b2d8; }
.menu-navigation-icons a.menu-blue i    { color: #3e8fb1; }

.menu-navigation-icons a.menu-green     { background-color: #8ccc7a; }
.menu-navigation-icons a.menu-green i   { color: #6fad5e; }

.menu-navigation-icons a.menu-yellow    { background-color: #dadf50; }
.menu-navigation-icons a.menu-yellow i  { color: #babe4a; }

.menu-navigation-icons a.menu-red       { background-color: #f26262; }
.menu-navigation-icons a.menu-red i     { color: #d34646; }

/* Make this page responsive */

.slicknav_menu {
    display:none;
}

@media (max-width: 800px) {
    .menu-navigation-icons{
        display:none;
    }

    .slicknav_nav a i {
        display: none;
    }

    .slicknav_menu {
        display:block;
    }
}

 <nav class="menu-navigation-icons ">
    <a href="#" class="menu-magenta"><i class="fa fa-camera-retro"></i><span>Pictures</span></a>
    <a href="#" class="menu-blue"><i class="fa fa-code"></i><span>Code</span></a>
    <a href="#" class="menu-green"><i class="fa fa-comment"></i><span>Talks</span></a>
    <a href="#" class="menu-yellow"><i class="fa fa-plane"></i><span>Travel</span></a>
    <a href="#" class="menu-red"><i class="fa fa-heart"></i><span>Favorites</span></a>





这是我的代码,我不知道如何使它响应,因为我的模板是响应式的,但是我放在页面中间的导航栏没有显示在小屏幕上?谁能回答?

最佳答案

这段代码使您的菜单在小型设备中消失。

.menu-navigation-icons{
    display:none;
}


删除该代码。

10-07 21:30