JSFiddle - React, Tailwind, and code Playground

by insightweb

HTML

<html>

<head>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
    <script>
        $(document).ready(function() {
            $('html').click(function(e) {
                $(".image").css("top", e.pageY);
                $(".image").css("left", e.pageX);
                $("#pagex").val(e.pageX);
                $("#pagey").val(e.pageY);
            });
        });
    </script>
    <style>
        
    </style>
</head>

<body>
    <img src="https://picsum.photos/200/300" width="200" height="300" class="image">
    <form action="ekle.php" method="post">
        <input type="text" name="pagex" id="pagex" value="">
        <input type="text" name="pagey" id="pagey" value="">
        <input type="submit" value="Ekle">
    </form>
</body>

</html>

CSS

body {
  background-color:'#000';
  width:600px
}
.image {
  position: absolute;
  top: 50;
  left: 0
}