I am trying to make interactive poster, but I have no idea how to make the squares to have pointed edges.
Please check out the image I attached!!
$("body").mousemove(function(e) {
var box = $("<div/>")
box.css("top", e.pageY);
box.css("left", e.pageX);
box.css("background-color", "black");
$("body").append(box);
box.animate({
height: "2000px",
opacity: .0
}, 2000, "swing");
});
body {
position: relative;
height: 5000px;
width: 100%;
margin: 0;
}
div {
height: 50px;
width: 50px;
opacity: .35;
position: absolute;
transform: translate(0%, -100%);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="index.css" />
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- include .js files here -->
<script src="script.js"></script>
</body>
</html>
So currently my code creates this visual effect,