jQuery实现的指纹扫描效果实例(附演示与demo源码下载)

2020-05-27 18:09:07易采站长站整理

本文实例讲述了jQuery实现的指纹扫描效果。分享给大家供大家参考,具体如下:

运行效果截图如下:

点击此处查看在线演示效果。

具体代码如下:


<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>demo</title>
<style type="text/css">
body {
background:black;
}
.dialog {
width:300px; height:300px; position:fixed; left:50%; margin-left:-150px; border:2px dashed green;
top:50px;
}
.dialog .shape {
background:black; width:300px; height:300px; z-index:1;
}
.dialog .eye {
width:200px; height:200px; position:absolute; left:50px; top:50px;
z-index:2;
}
#container {
position:relative;
}
.line {
position:absolute; left:0px; top:0px; font-size:0px; z-index:10;
background:green;
}
.btnGroup {
text-align:center;
}
.btnGroup button {
width:50px; height:40px;
}
.dialog.output {
top:400px; display:none;
}
#power {
border:1px solid green; position:fixed; right:20px; bottom:20px;
color:green; line-height:50px; font-size:30px;
}
.title {
line-height:50px; font-size:25px; color:#8F8383; text-shadow:0px 0px 3px green;
text-align:center;
}
</style>
</head>
<body>
<div class="dialog">
<div id="container">
<div class="shape"></div>
<img src="finger.png" class="eye" />
</div>
<div class="btnGroup">
<button id="vSee">竖向扫描</button>
<button id="hSee">横向扫描</button>
<button id="bSee">双向扫描</button>
<button id="dSee">深度扫描</button>
</div>
</div>
<div class="dialog output" id="outputContainer">
<img src="finger.png" class="eye" />
</div>
</body>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
var container = $("#container");
var outputContainer = $("#outputContainer");
function Line(type) {
var self = this;
self.type = type || "V";
var body = $("<div class='line'></div>");
switch(this.type) {
case "V": // 竖直
body.css({
"width": "1px",
"height": "300px"