You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
2.5 KiB
95 lines
2.5 KiB
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>PhotoViewer Examples</title>
|
|
<!-- Bootstrap -->
|
|
<link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
|
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="./js/photoviewer.css" rel="stylesheet">
|
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
|
<!--[if lt IE 9]>
|
|
<script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
|
<script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
|
|
<![endif]-->
|
|
<style>
|
|
.photoviewer-stage {
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
background-color: rgba(0, 0, 0, .85);
|
|
border: none;
|
|
}
|
|
|
|
.photoviewer-header .photoviewer-toolbar {
|
|
background-color: rgba(0, 0, 0, .5);
|
|
}
|
|
|
|
.photoviewer-footer {
|
|
bottom: 10px;
|
|
}
|
|
|
|
.photoviewer-footer .photoviewer-toolbar {
|
|
background-color: rgba(0, 0, 0, .5);
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.photoviewer-header,
|
|
.photoviewer-footer {
|
|
pointer-events: none;
|
|
}
|
|
|
|
.photoviewer-title {
|
|
color: #ccc;
|
|
}
|
|
|
|
.photoviewer-button {
|
|
color: #ccc;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.photoviewer-footer .photoviewer-button:hover {
|
|
color: white;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body dir="ltr">
|
|
<div class="container">
|
|
<input type="button" id="test" value="aaaa" />
|
|
</div>
|
|
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
|
|
|
|
<script src="./js/photoviewer.js"></script>
|
|
<script>
|
|
|
|
$(function () {
|
|
|
|
$("#test").click(function () {
|
|
var items = [{ src: "http://yp.edusoa.com/FengHuang//upload/7417e3cf-1b80-4e37-a42d-684b40b29247.jpg" }],
|
|
options = {
|
|
index: 0,
|
|
resizable: false,
|
|
title: false,
|
|
initMaximized: true,
|
|
headerToolbar: ['close'],
|
|
footerToolbar: [
|
|
'rotateLeft',
|
|
'rotateRight'
|
|
],
|
|
};
|
|
|
|
new PhotoViewer(items, options);
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
</body>
|
|
|
|
</html> |