温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

CSS3怎么实现彩色进度条动画特效

发布时间:2022-03-02 15:33:53 来源:亿速云 阅读:116 作者:iii 栏目:web开发

这篇文章主要介绍“CSS3怎么实现彩色进度条动画特效”,在日常操作中,相信很多人在CSS3怎么实现彩色进度条动画特效问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”CSS3怎么实现彩色进度条动画特效”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

代码设计

利用HBulider开发工具创建jindutiao.html文件,代码如下所示:

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>CSS3彩色进度条动画特效</title>

<link href="http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

<link rel="stylesheet" type="text/css" href="css/jindutiao.css"/>

</head>

<body>

<div>

<div>

<div>

<div class="col-md-offset-3 col-md-6">

<h4>HTML5</h4>

<div>

<div style="width:65%; background:#ef2d56;">

<div>65%</div>

</div>

</div>

<h4>CSS3</h4>

<div>

<div style="width:87%; background:#ff9900;">

<div>87%</div>

</div>

</div>

<h4>J-Query</h4>

<div>

<div style="width:55%; background:#82b700;">

<div>55%</div>

</div>

</div>

<h4>PHP</h4>

<div>

<div style="width:95%; background:#00ebdd;">

<div>95%</div>

</div>

</div>

</div>

</div>

</div>

</div>

</body>

<script src="http://cdn.bootcss.com/jquery/1.11.0/jquery.min.js" type="text/javascript"></script>

<script src="http://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

</html>

创建style.css用于存放制作进度条的各种样式,代码如下所示:

.demo{ background: #2c304a;padding: 2em 0; }

.progress-title{

font-size: 18px;

font-weight: 700;

color: #fff;

margin: 0 0 20px;

}

.progress{

height: 20px;

background: #171b3c;

border-radius: 20px;

border: 1px solid #000;

box-shadow: 0 2px 2px #4f4c4c;

margin-bottom: 40px;

overflow: visible;

position: relative;

}

.progress .progress-bar{

border-radius: 20px;

border: 1px solid #000;

-webkit-animation: animate-positive 2s;

animation: animate-positive 2s;

}

.progress .progress-value{

width: 65px;

height: 25px;

line-height: 25px;

background: #171b3c;

font-size: 15px;

color: #fff;

border-radius: 0 0 15px 15px;

border: 1px solid #000;

border-top: none;

box-shadow: 0 2px 2px #4f4c4c;

position: absolute;

bottom: -25px;

right: 60px;

}

@-webkit-keyframes animate-positive{

0% { width: 0; }

}

@keyframes animate-positive{

0% { width: 0; }

}

到此,关于“CSS3怎么实现彩色进度条动画特效”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注亿速云网站,小编会继续努力为大家带来更多实用的文章!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI