<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<body>
<style>
.bar{
width:200px;
height:20px;
border:2px solid rgb(252, 17, 5);
/* 圆角矩形 border-radius: ; */
border-radius: 5px;
padding:1px;
}
.bar_in{
width:40%;
height:100%;
background-color: rgb(3, 248, 40);
transition: width 0.5s;
}
.bar:hover .bar_in{
width:100%;
}
</style>
</head>
</body>
<div class="bar">
<div class="bar_in"></div>
</div>
</html>
运行结果:
进度条