代码如下
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>验证码</title>
<style>
.box{
position:relative;
width: 200px;
height: 40px;
background: #CCC;
display: block;
margin:150px auto;
}
.btn{
background:#EEE url(1.png) no-repeat;
background-position: center center;
position:absolute;
top:0;
width: 40px;
height: 40px;
z-index: 3;
line-height:40px;
}
.text{
position: absolute;
width: 100%;
margin: 0;
line-height:40px;
text-align: center;
z-index: 2;
}
.bg{
position: absolute;
height: 100%;
background-color: #7ac23c;
z-index: 1;
}
</style>
</head>
<body>
<div