纯CSS3 loading环形加载条_CSS3加载动画效果
2015-03-26 09:44:03  By: shinyuu

以前分享过一个html jQuery加载进度条插件、主要是使用jQuery和html实现的、现在再分享一个纯css3实现的条纹加载条、绿色条纹css3进度条、并且带有响应式的效果、代码非常简单、只有一点css、非常的轻盈、如果你有进度条的需求、这个非常不错、如果你觉得绿色和你的项目风格不一致、你也可以修改成其实颜色


纯css3加载条


HTML代码

<div class="container">
	<div class="warning">
	</div>
</div>


CSS代码


<style class="cp-pen-styles">
.warning {
  position: relative;
  background-color: #6DA807;
  border: 1px solid #6DA807;
  border-radius: 10px;
  box-shadow: 1vw 3vh 10vh rgba(109, 168, 7, 0.8);
  background-size: 3em 3em;
  background-image: linear-gradient(-45deg, transparent 0em, 
  transparent 0.8em, #96D923 0.9em, #96D923 2.1em, transparent 2.1em, 
  transparent 2.9em, #96D923 3.1em);
  -webkit-animation: warning-animation 750ms infinite linear;
  -moz-animation: warning-animation 750ms infinite linear;
  animation: warning-animation 750ms infinite linear;
}
@-webkit-keyframes warning-animation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 3em 0;
  }
}
@-moz-keyframes warning-animation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 3em 0;
  }
}
@keyframes warning-animation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 3em 0;
  }
}
.warning:before {
  content: ´´;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  border-radius: 10px;
  background-image: linear-gradient(to bottom, #6DA807, 
  rgba(171, 226, 77, 0.6) 15%, transparent 60%, #6DA807);
}

body, html {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  height: 100%;
}

body {
  background-repeat: no-repeat;
  background-position: center;
  background-image: radial-gradient(circle, #c0e979, #96d923);
}

.container {
  width: 80vw;
  margin: 45vh auto 0;
}
.container .warning {
  height: 10vh;
}
</style>


源代码下载链接: http://dwtedx.com/download.html?bdkey=s/1mgJw5ra 密码: 36fk

若资源对你有帮助、浏览后有很大收获、不妨小额打赏我一下、你的鼓励是维持我不断写博客最大动力

想获取DD博客最新代码、你可以扫描下方的二维码、关注DD博客微信公众号(ddblogs)

或者你也可以关注我的新浪微博、了解DD博客的最新动态:DD博客官方微博(dwtedx的微博)

如对资源有任何疑问或觉得仍然有很大的改善空间、可以对该博文进行评论、希望不吝赐教

为保证及时回复、可以使用博客留言板给我留言: DD博客留言板(dwtedx的留言板)

感谢你的访问、祝你生活愉快、工作顺心、欢迎常来逛逛


快速评论


技术评论

    • shinyuu 2015-04-04 14:24:08  2 评  | 回复

      @情侣网名:本文中的css代码就放在html文件里面就可以了,关于语音那个代码你可以参考一下源代码里面的mainactivity.java里面的代码


DD记账
top
+