http://sigmajs.org/ les mis 教程 - 为什么我的画布高度为 0?
http://sigmajs.org/ les mis tutorial - why are my canvases 0 height?
我正在浏览 http://sigmajs.org/ les miserable tutorial. I'm curious, when I run a local server and view my index.html 页面,为什么 sigmas.js 生成的画布高度为 0?
https://github.com/micahstubbs/les-mis-tut/blob/master/02/index.html
因为您的 CSS 代码是错误的。
将其替换为:
#sigma-container {
position :absolute;
width :500px;
height :500px;
}
我正在浏览 http://sigmajs.org/ les miserable tutorial. I'm curious, when I run a local server and view my index.html 页面,为什么 sigmas.js 生成的画布高度为 0?
https://github.com/micahstubbs/les-mis-tut/blob/master/02/index.html
因为您的 CSS 代码是错误的。 将其替换为:
#sigma-container {
position :absolute;
width :500px;
height :500px;
}