我从https://pmg.softwaretailoring.net/中生成了一个导航轮,但是在查看了它们的文档之后,我想不出如何在轮子中的项目之间添加空格。他们乱七八糟的。在我不知道实例化的轮导航对象上有什么函数吗?我试图通过他们的.js文件手动找到它,但什么也找不到。
发布于 2021-04-23 09:07:35
您可以使用带背景色的笔画宽度属性来实现间距。
当cssMode为真时,请使用以下CSS。
[id|=wheelnav-wheelDiv-slice] {
fill: white;
stroke: *background-color*;
stroke-width: 10px;
cursor: pointer;
}更多信息在这里:https://wheelnavjs.softwaretailoring.net/documentation/css3.html
如果没有cssMode,请使用以下JavaScript。
var wheel = new wheelnav("wheelDiv");
wheel.slicePathAttr = { stroke: "*background-color*", "stroke-width": 10, cursor: 'pointer' };
wheel.sliceHoverAttr = { stroke: "*background-color*", "stroke-width": 10, cursor: 'pointer' };
wheel.sliceSelectedAttr = { stroke: "*background-color*", "stroke-width": 10, cursor: 'default' };
wheel.createWheel(["First", "Second", "Third", "Fourth"]);或者,您可以通过定制创建自己的slicePath。
更多信息在这里:https://wheelnavjs.softwaretailoring.net/documentation/slicePath.html#tutorial
https://stackoverflow.com/questions/67201697
复制相似问题