CSS3怎么实现彩色进度条动画特效(CSS3,web开发)

时间:2024-05-10 00:25:47 作者 : 石家庄SEO 分类 : web开发
  • TAG :

    CSS3%E6%80%8E%E4%B9%88%E5%AE%9E%E7%8E%B0%E5%BD%A9%E8%89%B2%E8%BF%9B%E5%BA%A6%E6%9D%A1%E5%8A%A8%E7%94%BB%E7%89%B9%E6%95%88

代码设计

利用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怎么实现彩色进度条动画特效的详细内容,希望对您有所帮助,信息来源于网络。
上一篇:怎么用CSS3实现逐渐发光的方格边框下一篇:

4 人围观 / 0 条评论 ↓快速评论↓

(必须)

(必须,保密)

阿狸1 阿狸2 阿狸3 阿狸4 阿狸5 阿狸6 阿狸7 阿狸8 阿狸9 阿狸10 阿狸11 阿狸12 阿狸13 阿狸14 阿狸15 阿狸16 阿狸17 阿狸18