如何从关键帧动画中免除元素?

时间:2014-10-08 19:42:35

标签: html css

我正在使用关键帧来淡化<nav>。然而,我想要一个li不要淡入。有人知道怎么做?

首先是CSS:

nav{   
    -webkit-animation: fadein 0.5s; 
    -moz-animation: fadein 0.5s; 
    -ms-animation: fadein 0.5s; 
     -o-animation: fadein 0.5s; 
        animation: fadein 0.5s;
}

@keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@-moz-keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@-webkit-keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
 }

@-ms-keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@-o-keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

这是HTML:

<nav id="nav">
    <ul>
    <li id="menuIcon"> <img src="menuIcon.svg" alt="q" onclick="showMenu()">  </li>
        <li id="aboutList"> <a href="#about"> About </a> </li>
        <li id="openingList"> <a href="#opening"> When </a> </li>
        <li id="whereList"> <a href="#where"> Where </a> </li>      
    </ul>   
</nav>

0 个答案:

没有答案