简体   繁体   English

javascript中的html5画布图像网格

[英]html5 canvas image grid in javascript

I'm trying to build an image grid with canvas, but I'm not sure how to perform operations when a particular image is clicked. 我正在尝试使用画布构建图像网格,但是我不确定在单击特定图像时如何执行操作。 I want to achieve functionality like in this website https://big.dk/#projects but it's too complicated for me to grasp, I'm comfortable using javascript preferably Angularjs instead of JQuery if possible. 我想实现此网站https://big.dk/#projects中的功能,但对我来说太复杂了,如果可能的话,我很喜欢使用javascript,最好是Angularjs而不是JQuery。 I'm thinking of using tables to align images in a grid, can we achieve this kind of functionality without using canvas ? 我正在考虑使用表格在网格中对齐图像,是否可以在不使用画布的情况下实现这种功能? any suggestions would be of great help. 任何建议都会有很大帮助。 thank you. 谢谢。

Yes, of course you can make this without using canvas either using bootstrap grid or with any other grid system you like, Probably this can help you jsfiddle.net/webtiki/MpXYr/2/ 是的,您当然可以在不使用画布的情况下使用引导网格或您喜欢的任何其他网格系统来做到这一点,这可能会帮助您jsfiddle.net/webtiki/MpXYr/2/

And you should use transition css for smooth image zooming(resizing) on mouse hover. 并且您应该使用过渡CSS来使鼠标悬停时图像平滑缩放(调整大小)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM