zoukankan      html  css  js  c++  java
  • css3元素简单的闪烁效果(html5 jquery)

    css3 Animation:

    @-webkit-keyframes twinkling{ /*透明度由0到1*/
    0%{
    opacity:0; /*透明度为0*/
    }
    100%{
    opacity:1; /*透明度为1*/

    }
    }

    Jquery :

    $(element).css({"-webkit-animation":"twinkling 1s infinite ease-in-out"}); //在对象element中添加闪烁动画

    也可以在css样式里添加如下:

        #element{

              -webkit-animation: twinkling 1s infinite ease-in-out; 

     

         }

     注:动画名称为twinkling  时间为1s  动画次数为无限次  动画效果 ease-in-out 

    http://www.cnblogs.com/roucheng/

     简单吧!其实用css3做动画效果,比用flash,javascript要方便简单多了!希望浏览器赶快都支持css3 Animation .目前webkit内核的浏览器都支持(safrai,chrome)

  • 相关阅读:
    jquery02
    jquery01
    oracle04_plsql
    oracle03
    oracle02
    oracle01
    selenium
    爬取京东商品信息并保存到MongoDB
    python pymongo操作之增删改查
    MongoDB 数据库表删除
  • 原文地址:https://www.cnblogs.com/roucheng/p/3509733.html
Copyright © 2011-2022 走看看