代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="jquery.js"></script>
<style>
.box {
width:250px;
height:40px;
position:relative;
background-color:#ccc;
line-height:40px;
margin:20px auto;
}
.bg {
position:absolute;
height:100%;
background-color:#09BB07;
z-index:1;