首页 技术 正文
技术 2022年11月7日
0 收藏 970 点赞 530 浏览 4428 个字

实例结果图:

【Demo】CSS3 动画  加载进度条

完整代码:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>加载进度条</title>
<style type="text/css">
body{
background: #e9e5e2;
}
#skill{
list-style: none;
font: 12px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
width: 296px;
margin: 50px auto 0;
position: relative;
line-height: 2em;
padding: 30px 0;
}
#skill li{
margin-bottom: 50px;
background: #e9e5e2;
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e1ddd9), to(#e9e5e2));
background-image: -webkit-linear-gradient(#e1ddd9, #e9e5e2);
background-image: -moz-linear-gradient(#e1ddd9, #e9e5e2);
background-image: -o-linear-gradient(#e1ddd9, #e9e5e2);
background-image: linear-gradient(#e1ddd9, #e9e5e2);
height: 20px;
border-radius: 10px;
box-shadow: 0 1px 0px #bebbb9 inset,0 1px 0 #fcfcfc;
-moz-box-shadow: 0 1px 0px #bebbb9 inset, 0 1px 0 #fcfcfc;
-webkit-box-shadow: 0 1px 0px #bebbb9 inset, 0 1px 0 #fcfcfc;
}
#skill li h3{
position: relative;
top: -25px;
}
.bar{
height: 18px;
margin: 1px 2px;
position: absolute;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
box-shadow: 0 1px 0px #fcfcfc inset, 0 1px 0 #bebbb9;
}
.graphic-design{
width: 100%;
animation: graphic-design 2s ease-out;
-moz-animation: graphic-design 2s ease-out;
-ms-animation: graphic-design 2s ease-out;
-webkit-animation: graphic-design 2s ease-out;
background: #f674a4;
background-image: -webkit-gradient(linear, left top, left bottom, from(#f674a4), to(#e06995));
background-image: -webkit-linear-gradient(top, #f674a4, #e06995);
background-image: -moz-linear-gradient(top, #f674a4, #e06995);
background-image: -ms-linear-gradient(top, #f674a4, #e06995);
background-image: -o-linear-gradient(top, #f674a4, #e06995);
background-image: linear-gradient(top, #f674a4, #e06995);
}
.html-css{
width: 90%;
background: #f0bb4b;
animation: html-css 2s ease-out;
-moz-animation: html-css 2s ease-out;
-ms-animation: html-css 2s ease-out;
-webkit-animation: html-css 2s ease-out;
background-image: linear-gradient(top, #f0bb4b, #d9aa44);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0bb4b), to(#d9aa44));
background-image: -webkit-linear-gradient(top, #f0bb4b, #d9aa44);
background-image: -moz-linear-gradient(top, #f0bb4b, #d9aa44);
background-image: -ms-linear-gradient(top, #f0bb4b, #d9aa44);
background-image: -o-linear-gradient(top, #f0bb4b, #d9aa44);
}
.jquery{
width: 80%;
background-color: #a1ce5b;
animation: jquery 2s ease-out;
-moz-animation: jquery 2s ease-out;
-ms-animation: jquery 2s ease-out;
-webkit-animation: jquery 2s ease-out;
background-image: -webkit-gradient(linear, left top, left bottom, from(#a1ce5b), to(#91ba52));
background-image: -webkit-linear-gradient(top, #a1ce5b, #91ba52);
background-image: -moz-linear-gradient(top, #a1ce5b, #91ba52);
background-image: -ms-linear-gradient(top, #a1ce5b, #91ba52);
background-image: -o-linear-gradient(top, #a1ce5b, #91ba52);
background-image: linear-gradient(top, #a1ce5b, #91ba52);
}
.wordpress{
width: 70%;
background-color: #66b3cc;
animation: wordpress 2s ease-out;
-moz-animation: wordpress 2s ease-out;
-ms-animation: wordpress 2s ease-out;
-webkit-animation: wordpress 2s ease-out;
background-image: -webkit-gradient(linear, left top, left bottom, from(#66b3cc), to(#5da3ba));
background-image: -webkit-linear-gradient(top, #66b3cc, #5da3ba);
background-image: -moz-linear-gradient(top, #66b3cc, #5da3ba);
background-image: -ms-linear-gradient(top, #66b3cc, #5da3ba);
background-image: -o-linear-gradient(top, #66b3cc, #5da3ba);
background-image: linear-gradient(top, #66b3cc, #5da3ba)
} /*动画*/
@keyframes graphic-design{
0%{width: 0px;}
100%{width: 100%;}
}
@-moz-keyframes graphic-design{
0%{width: 0px;}
100%{width: 100%;}
}
@-ms-keyframes graphic-design{
0%{width: 0px;}
100%{width: 100%;}
}
@-webkit-keyframes graphic-design{
0%{width: 0px;}
100%{width: 100%;}
} @keyframes html-css{
0%{width: 0px;}
100%{width: 90%;}
}
@-moz-keyframes html-css{
0%{width: 0px;}
100%{90%;}
}
@-ms-keyframes html-css{
0%{width: 0px;}
100%{width: 90%;}
}
@-webkit-keyframes html-css{
0%{width: 0px;}
100%{width: 90%;}
} @keyframes jquery{
0%{width: 0px;}
100%{width: 80%;}
}
@-moz-keyframes jquery{
0%{width: 0px;}
100%{80%;}
}
@-ms-keyframes jquery{
0%{width: 0px;}
100%{width: 80%;}
}
@-webkit-keyframes jquery{
0%{width: 0px;}
100%{width: 80%;}
} @keyframes wordpress{
0%{width: 0px;}
100%{width: 70%;}
}
@-moz-keyframes wordpress{
0%{width: 0px;}
100%{70%;}
}
@-ms-keyframes wordpress{
0%{width: 0px;}
100%{width: 70%;}
}
@-webkit-keyframes wordpress{
0%{width: 0px;}
100%{width: 70%;}
} </style>
</head>
<body>
<ul id="skill">
<li><span class="bar graphic-design"></span><h3>Graphic Design</h3></li>
<li><span class="bar html-css"></span><h3>Html // Css</h3></li>
<li><span class="bar jquery"></span><h3>jQuery // MoTools</h3></li>
<li><span class="bar wordpress"></span><h3>Wordpress</h3></li>
</ul>
</body>
</html>
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,028
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,518
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,365
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,146
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,780
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,857