You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>textst</title>
<script type="text/javascript" src="textst.js"></script>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<style type="text/css">
body{
background-color: black;
color: white;
}
div{background-image: url("https://i.ytimg.com/vi/d96Knr0DAmU/maxresdefault.jpg") /*, url("https://cdn.pixabay.com/photo/2016/04/01/22/41/perspective-1301762_640.png"*/);
position: relative;
width: 3000px;
height: 2000px;
margin-top: -500px;
border: 2px solid green;
cursor: all-scroll;
}
pre{
border-radius: 25px;
position: absolute;
top: 500px;
left: 500px;
padding: 10px;
border: 2px solid #fff;
}
</style>
</head>
<body>
<div class="movable"></div>
<script type="text/javascript">
$(document).ready(function(){
for (var i = 0; i < x.length; i++) {
$("div").append('<pre class="movable">' + x[i] + '</pre>');
}
$( function() {
$( ".draggable" ).draggable();
});
var words = document.querySelectorAll(".movable");
for (var e = 0; e < words.length; e++){
var span = words[e];
span.classList.add("draggable");
}
});
</script>
</body>
</html>