12 lines
295 B
HTML
12 lines
295 B
HTML
<html>
|
|
<body>
|
|
<svg xmlns="http://www.w3.org/2000/svg" height="100%" width="100%">
|
|
<rect id="rect" width="100" height="100" fill="green"/>
|
|
</svg>
|
|
<script>
|
|
var pos = Math.round(window.innerWidth * 2 / 3);
|
|
document.getElementById('rect').setAttribute('x', pos);
|
|
</script>
|
|
</body>
|
|
</html>
|