目录
第四步,接下来我们做出圆角的效果,这里要用到border-radius
Video_2022-07-20_171724
我们先看一下动画效果
大家可以看得见我把鼠标一放到进度条上,进度条就开始动了,这和我们平时看电视时的进度条效果很像,接下来就带大家制作,并进行优化
- html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>title>
- head>
- <body>
- body>
- html>
第二步:然后我们写两个div
- html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>title>
- head>
- <body>
- <div id="bodys">
- <div class="box">div>
- div>
- body>
- html>
- html>
- <html>
- <head>
- <meta charset="utf-8" />
- <title>title>
- <style type="text/css">
- * {
- margin: 0;
- padding: 0;
- }
-
- #bodys {
- width: 300px;
- height: 30px;
- border: 1px solid red;
- }
-
- .box {
- background: #12c2e9;
- background: -webkit-linear-gradient(to right, #f64f59, #c471ed, #12c2e9);
- background: linear-gradient(to right, #f64f59, #c471ed, #12c2e9);
-
- width: 100px;
- height: 30px;
- }
-
- style>
- head>
- <body>
-
- <div id="bodys">
- <div class="box">div>
- div>
-
- body>
- html>
-