JSを使用してそれらを実装する操作要素と位置決め要素が良い選択です。以下に例があります。それを必要とする友達はそれを見ることができます。
<!doctype html> <html> <head> <meta http-equiv = "content-type" content = "text/html; charset = utf-8"/> <title> 1つのJavaScriptインスタンス1日あたりのJavaScriptインスタンスは、要素</title> <title> div:500px; } div {border:1px solid#000;パディング:10px; } #cursor {position:absolute;バックグラウンドカラー:#ff0;幅:20px;高さ:20px;左:50px;トップ:300px; } </style> <script> function positionObject(obj){var rect = obj.getBoundingClientRect(); return [rect.left、rect.top]; } window.onload = function(){var tst = document.documentelement.getBoundingClientRect();アラート(tst.top); var cont = 'a'; var cursor = document.getElementById( "cursor"); while(cont){cont = prompt( "カーソルブロックをどこに移動しますか?"、 "a"); if(cont){cont = cont.tolowercase(); if(cont == "a" || cont == "b" || cont == "c"){var elem = document.getElementById(cont); var pos = positionObject(elem); console.log(pos); cursor.setattribute( "style"、 "top:"+pos [1]+"px;"+"left:"+pos [0]+"px"); }}}}} </script> </head> <body> <div id = "a"> <p> a </p> <div id = "b"> <p> b </p> <div id = "c"> <p> </div> </div> </div> <div div = "