与使用JavaScript点击点绘制线条 [英] Drawing lines with clickable points using JavaScript

查看:184
本文介绍了与使用JavaScript点击点绘制线条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有兴趣做使用JavaScript的一些图纸。我就直奔一个例子:

I'm interested in doing some drawing using JavaScript. I'll get straight to an example:


绿色水平线将是静态的,而且所有的垂直线会点击。一个点击线的例子是红色的。

The green horizontal line would be static, and all the vertical lines would be clickable. An example of a clicked line would be the red one.

我见过很多的API,但他们都让更多的复杂性比我更需要,使得它比必要的更加复杂。

I've seen many API's, but they all allow more complexity than I need, making it more complicated than necessary.

一个很好的API任何建议?让它自己?

Any suggestion for a good API? Make it oneself?

推荐答案

您可以使用CSS和HTML弥补最初行。然后转乘一些这在JS。对我来说,从你描述什么它看起来并不难从头开始做。

You could use CSS and html to make up the lines initially. Then transfer some of this into the JS. To me from what you have described it doesn't look that difficult to do from scratch.

有可能是别的东西,你有没有已经提到!

There's probably something else you haven't mentioned though!

这篇关于与使用JavaScript点击点绘制线条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆