<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1" />
<style type="text/css">
*{
margin:0;
padding:0;
}
.content{
width:100%;
overflow:hidden;
position:relative;
}
.signWraper{
height:100%;
width:100%;
overflow:hidden;
display: flex;
position: absolute;
left: 100%;
z-index: 2;
}
.signWraper .handlerDiv{
flex: 1;
height: 100%;
display: flex;
justify-content: space-around;
align-items: center;
flex-direction: column;
background: #fff;
}
.signWraper .handlerDiv button{
transform: rotate(90deg);
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-o-transform: rotate(90deg);
-ms-transform: rotate(90deg);
background: -moz-linear-gradient(left, #f9E29C, #E7BD75);
background: -webkit-linear-gradient(left, #f9E29C, #E7BD75);
background: -o-linear-gradient(left, #f9E29C, #E7BD75);
width: 100%;
height: 35px;
border: 0;
border-radius: 5px;
}
.signImg{
width: 180px;
display:none;
}
.signatureparent {
color: darkblue;
background-color: darkgrey;
width: 75%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.signatureparent>div{
border: 2px dotted black;
background-color:lightgrey;
height: 90%;
width:80%;
}
</style>
</head>
<body>
<div class="content">
<div class="signWraper">
<div class="handlerDiv">
<button id="reset" type="button" onclick="reset()">重置签名</button>
<button id="getSign" type="button" onclick="getSign()">生成签名</button>
</div>
<div class="signatureparent">
<div id="signature"></div>
</div>
</div>
<div>
<button id="goSign" type="button" style="width:100px;height:40px;margin:20px" onclick="goSign()">签名</button>
</div>
<div>
<div>签名图片:</div>
<div style="text-align:center;">
<img id="signImg" class="signImg" src="">
</div>
</div>
</div>
<script src="jquery-1.10.1.min.js"></script>
<script src="jSignature.js"></script>
<script src="signName.js"></script>
</body>
</html>