Html 如何使用animate.css向网站添加动画

Html 如何使用animate.css向网站添加动画,html,css,animation,css-animations,animate.css,Html,Css,Animation,Css Animations,Animate.css,我正在尝试将动画“fadeIn”添加到我的proje[enter link description here][1]ct中,但动画不起作用。如果任何有animate.css经验的人都能帮助我,我将不胜感激。我将animate.css网站上的CDN{安装到我的项目中 我在我的课堂上添加了动画,但它不起作用 任何帮助都将不胜感激,谢谢 <!DOCTYPE html> 在Animate.css的文档中说: 您无法设置内联元素的动画。即使某些浏览器可以 为内联元素设置动画,这与CSS动

我正在尝试将动画“fadeIn”添加到我的proje[enter link description here][1]ct中,但动画不起作用。如果任何有animate.css经验的人都能帮助我,我将不胜感激。我将animate.css网站上的CDN{安装到我的项目中

我在我的课堂上添加了动画,但它不起作用

任何帮助都将不胜感激,谢谢

<!DOCTYPE html>


在Animate.css的文档中说:

您无法设置内联元素的动画。即使某些浏览器可以 为内联元素设置动画,这与CSS动画规格和 将在某些浏览器上中断或最终停止工作。始终 为网格和flex容器中的块或内联块级元素设置动画 子元素也是块级元素。您可以将元素设置为 显示:设置内联层级元素动画时的内联块

也许,由于某种原因,元素的显示不允许显示动画。
如果我们可以在线查看您的项目以获得更深入的信息,这将非常有用。

这是animate.css的工作代码。它可以根据您的需要使用fadeIn效果

演示:

有关更多信息,请参阅本文档:

HTML


谢谢你的回复,但是你提供的链接不起作用。我也在编辑器括号中复制了你的代码,没有fadeIn效果。我真的很困惑为什么你可以这样做,但我没有。你是否在代码中添加了关键帧、延迟或不透明度?更新我尝试了抖动动画,它成功了,我想当我应用fadeIn时imation我必须添加一个延迟,以便看到效果,或者可能添加不透明度。如果我错了,请告诉我我是新手lo@EmmanuelAppiah你能接受这个答案吗?所以这个解决方案也会帮助其他人。谢谢你的评论,这是我完整代码的链接:如果链接不起作用,请通知我
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="vendors/css/normalize.css">
    <link rel="stylesheet" type="text/css" href="vendors/css/grid.css">
    <link rel="stylesheet" type="text/css" href="vendors/css/ionicons.min.css">
   <link  rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.min.css">
    <link rel="stylesheet" type="text/css" href="resources/css/style.css">
    <link rel="stylesheet" type="text/css" href="resources/css/queries.css">
    <link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,300italic' rel='stylesheet' type='text/css'>

    <title>Omni Food</title>
</head>
<body>
    <header>
        <nav>
            <div class="row">
                 <img src="Resources/IMG/logo-white.png" alt="Omnifood logo" class="logo">
                 <img src="Resources/IMG/logo.png" alt="Omnifood logo" class="logo-black">
                 <ul class="main-nav">
                     <li><a href="#features">Food delivery</a></li>
                     <li><a href="#works">How it works</a></li>
                     <li><a href="#cities">Our cities</a></li>
                     <li><a href="#plans">Sign up</a></li>
                </ul>
            </div>
        </nav>
        <div class="hero-text-box">
            <h1>Goodbye junk food.<br>Hello super healthy meals.</h1>
            <a class="btn btn-full js--scroll-to-plans" href="#">I’m hungry</a>
            <a class="btn btn-ghost js--scroll-to-start" href="#">Show me more</a>
        </div>

    </header>

     <section class="section-features js--section-features" id="features">
         <div class="row">
             <h2>Get food fast &mdash; not fast food.</h2>
             <p class="long-copy">
             Hello, we’re Omnifood, your new premium food delivery service. We know you’re always busy. No time for cooking. So let us take care of that, we’re really good at it, we promise!
             </p>
         </div>

         <div class="row animate__animated animate__fadeIn"> 
             <div class="col span-1-of-4 box">
                 <i class="ion-ios-infinite-outline icon-big"></i>
                 <h3>Up to 365 days/year</h3>
                 <p>
                     Never cook again! We really mean that. Our subscription plans include up to 365 days/year coverage. You can also choose to order more flexibly if that's your style.          
                 </p>
             </div>

              <div class="col span-1-of-4 box">
                  <i class="ion-ios-stopwatch-outline icon-big"></i>
                 <h3>Ready in 20 minutes</h3>
                 <p>
                     You're only twenty minutes away from your delicious and super healthy meals delivered right to your home. We work with the best chefs in each town to ensure that you're 100% happy.    
                 </p>

             </div> 
             <div class="col span-1-of-4 box">
                 <i class="ion-ios-nutrition-outline icon-big"></i>
                 <h3>100% organic</h3>
                 <p>
                    All our vegetables are fresh, organic and local. Animals are raised without added hormones or antibiotics. Good for your health, the environment, and it also tastes better!     
                 </p>

             </div> 
             <div class="col span-1-of-4 box">
                 <i class="ion-ios-cart-outline icon-big"></i>
                 <h3>Order anything</h3>
                 <p>
                    We don't limit your creativity, which means you can order whatever you feel like. You can also choose from our menu containing over 100 delicious meals. It's up to you!      
                 </p>
             </div> 
         </div>         
     </section>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="vendors/css/normalize.css">
    <link rel="stylesheet" type="text/css" href="vendors/css/grid.css">
    <link rel="stylesheet" type="text/css" href="vendors/css/ionicons.min.css">
   <link  rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.min.css">
    <link rel="stylesheet" type="text/css" href="resources/css/style.css">
    <link rel="stylesheet" type="text/css" href="resources/css/queries.css">
    <link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,300italic' rel='stylesheet' type='text/css'>
 <title>Omni Food</title>
</head>
<body>
    <header>
      <h1 class="animate__animated animate__fadeIn">An animated element</h1>
        <nav>
            <div class="row animate__animated animate__fadeIn">
                 <ul class="main-nav animate__fadeIn">
                     <li><a href="#features">Food delivery</a></li>
                     <li><a href="#works">How it works</a></li>
                     <li><a href="#cities">Our cities</a></li>
                     <li><a href="#plans">Sign up</a></li>
                </ul>
            </div>
        </nav>
        <div class="hero-text-box animate__animated animate__fadeIn">
            <h1>Goodbye junk food.<br>Hello super healthy meals.</h1>
            <a class="btn btn-full js--scroll-to-plans" href="#">I’m hungry</a>
            <a class="btn btn-ghost js--scroll-to-start" href="#">Show me more</a>
        </div>
    </header>
     <section class="section-features js--section-features" id="features">
         <div class="row animate__animated animate__fadeIn"> 
             <div class="col span-1-of-4 box">
                 <i class="ion-ios-infinite-outline icon-big"></i>
                 <h3>Up to 365 days/year</h3>
                 <p>
                     Never cook again! We really mean that. Our subscription plans include up to 365 days/year coverage. You can also choose to order more flexibly if that's your style.          
                 </p>
             </div>

              <div class="col span-1-of-4 box">
                  <i class="ion-ios-stopwatch-outline icon-big"></i>
                 <h3>Ready in 20 minutes</h3>
                 <p>
                     You're only twenty minutes away from your delicious and super healthy meals delivered right to your home. We work with the best chefs in each town to ensure that you're 100% happy.    
                 </p>

             </div> 
             <div class="col span-1-of-4 box">
                 <i class="ion-ios-nutrition-outline icon-big"></i>
                 <h3>100% organic</h3>
                 <p>
                    All our vegetables are fresh, organic and local. Animals are raised without added hormones or antibiotics. Good for your health, the environment, and it also tastes better!     
                 </p>

             </div> 
             <div class="col span-1-of-4 box">
                 <i class="ion-ios-cart-outline icon-big"></i>
                 <h3>Order anything</h3>
                 <p>
                    We don't limit your creativity, which means you can order whatever you feel like. You can also choose from our menu containing over 100 delicious meals. It's up to you!      
                 </p>
             </div> 
         </div>         
     </section>