kityminder
Version:
78 lines (71 loc) • 1.74 kB
HTML
<html>
<head>
<meta charset="utf-8">
<title>FUI</title>
<link rel="stylesheet" type="text/css" href="../theme/default/fui.all.css">
<style>
.test1 {
background: red;
}
.test2 {
background: blue;
}
.test3 {
background: green;
}
.test4 {
background: cyan;
}
.test5 {
background: #000;
opacity: 0.3;
}
body>button {
margin: 100px;
}
body>.div {
border: 5px solid #c3c3c3;
display: inline-block;
width: 200px;
height: 200px;
margin: 100px;
}
</style>
<script src="../dev-lib/jhtmls.min.js"></script>
<script src="../dev-lib/jquery-1.11.1.js"></script>
<script src="../dev-lib/dev-define.js"></script>
<script>
inc.config({
base: '../src'
});
</script>
<script src="../dev-lib/exports.js"></script>
<script src="../dev-lib/dev-start.js"></script>
<script>
window.onload = function () {
var $btn = $('#test1'),
popup = new FUI.Popup({
className: 'popup'
});
popup.positionTo($btn[0]);
popup.appendTo(document.body);
$btn.click(function(){
popup.open();
});
};
</script>
<style>
.popup{
background: red;
width:100px;
height:100px;
border:#ccc 1px solid;
}
</style>
</head>
<body>
<h1>Pupop Panel 示例</h1>
<button id="test1">button</button>
</body>
</html>