css3 小特效

闪烁的灯、光标

.light{
    width: 100%; 
    height: 10px;
    margin-top: 40px;
    animation: blink 1s infinite;
    // animation: blink 1s infinite steps(1, start);
}
@keyframes blink {
    0%, 100% {
        background-color: #00A6FD;
    }
    50% {
        background-color: #ddd; 
    }
}

摆动效果、摇摆

#hand{
   -webkit-animation:swinging 2s ease-in-out 0s infinite;
   -moz-animation:swinging 2s ease-in-out 0s infinite;
   animation:swinging 2s ease-in-out 0s infinite;
   -webkit-transform-origin: 50% 100%;
   -moz-transform-origin: 50% 100%;
   transform-origin: 50% 100%;
}

@-webkit-keyframes swinging{
   0% { -webkit-transform: rotate(10deg); }
   50% { -webkit-transform: rotate(-10deg); }
   100% { -webkit-transform: rotate(10deg); }
}

返回顶部小icon&css3实现小三角

返回顶部
.goback{
    border-radius: 50% 50%;
    background: rgba(0,0,0,.4);
    text-align: center;
    width: 90px;
    height: 90px;
    box-sizing: border-box;
    padding-top: 30px;
    position: fixed;
    bottom: 50px;
    right: 50px;
    &:after{
      content: '';
      display: block;
      width: 40px;
      height: 40px;
      border-bottom: 0;
      border-right: 0;
      border-top: 1px solid #fff; 
      border-left: 1px solid #fff;
      margin: 0 auto;
      z-index: 1;
      transform: matrix(.5,.5,-.5,.5,0,0);  /*浏览器前缀自己加一下就行*/
    }
  }

svg Loading效果

<svg version="1.1" id="loader-1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="40px" height="40px" viewBox="0 0 50 50" enable-background="new 0 0 50 50" style="" xml:space="preserve">
     <path fill="#000" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z" transform="rotate(152.985 25 25)">
         <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite"></animateTransform>
     </path>
</svg>
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 选择qi:是表达式 标签选择器 类选择器 属性选择器 继承属性: color,font,text-align,li...
    love2013阅读 6,835评论 0 11
  • 各种纯css图标 CSS3可以实现很多漂亮的图形,我收集了32种图形,在下面列出。直接用CSS3画出这些图形,要比...
    剑残阅读 13,249评论 0 8
  • 选择qi:是表达式 标签选择器 类选择器 属性选择器 继承属性: color,font,text-align,li...
    wzhiq896阅读 5,800评论 0 2
  • W3C标准中对css3的transition这是样描述的:“css的transition允许css的属性值在一定的...
    青春前行阅读 5,281评论 0 5
  • 一直以来,奥运会给人感觉都是特别的严肃,而且,大多得奖者或是输了比赛的参赛者似乎都有个固定的套路来回答问题。但是,...
    V之日志阅读 3,587评论 0 3