为什么没有代码可以下载
为什么没有代码可以下载
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Path Demo</title>
<style>
#input {
position: fixed;
bottom: 25px;
left: 0;
width: 100%;
height: 50px;
padding: 0 25px;
font-size: 32px;
border: none;
border-top: 2px solid gray;
}
</style>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" height="800">
<path id="path" d="M 0 0 L 100 100" stroke="green" fill="none" stroke-width="2"></path>
</svg>
<input id="input" type="text" value="M 0 0 L 100 100">
<script>
input.addEventListener('input', function() {
path.setAttribute('d', input.value);
}, false);
</script>
</body>
</html>按照老师的界面,自己做的,老师应该不是这样实现的,因为他可以选中数字之后,按上下键实现快速调整数字,不知道这个到底是怎么做的
举报