js+css实现可配置参数的蜘蛛网代码
代码语言:html
所属分类:布局界面
代码描述:js+css实现可配置参数的蜘蛛网代码,,可调节线的数量及点的数量,还可调节环的数量及扩展大小。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { accent-color: orange; background: black radial-gradient(orange, black 75%) no-repeat; color: #FFF; font-family: system-ui; margin: 0; } circle { fill: currentColor; } fieldset { background: black; border: 0; display: flex; flex-wrap: wrap; gap: 1ch; justify-content: space-between; isolation: isolate; } label { align-items: center; display: flex; font-size: x-small; gap: 1ch; } line { stroke: currentColor; } svg { overflow: visible } </style> </head> <body > <form id="app"> <fieldset> <label>Points <input type="range" name="pointsring" min="5" max="20" value="12"> </label> <label>Dots <input type="range" name="dotsize" min="1" max="7" value="3"> </label> <label>Rings <input type="range" name="numrings" min="3" max="20" value="12"> </label> <label>Spread <input type="range" name="spread" min="10" max="100" value="40"> </label> </fieldset> </form> <svg viewBox="0 0 1000 1000" class="webdesigner"><g> <circle cx="460" cy="500" r="3"></circle> <line x1="460" y1="500" x2="20" y2="500" stroke-width="1.29"></line> <circle cx="465" cy="480" r="3"></circle> <line x1="465" y1="480" x2="460" y2="500" stroke-width="0.49"></line> <line x1="465" y1="480" x2="84" y2="260" stroke-width="1.26"></line> <circle cx="480" cy="465" r="3"></circle> <line x1="480" y1="465" x2="465" y2="480" stroke-width="0.31"></line> <line x1="480" y1="465" x2="260" y2="84" stroke-width="1.34"></line> <circle cx="500" cy="460" r="3"></circle> <line x1="500" y1="460" x2="480" y2="465" stroke-width="0.54"></line> <line x1="500" y1="460" x2="500" y2="20" stroke-width="0.86"></line> <circle cx="520" cy="465" r="3"></circle> <line x1="520" y1="465" x2="500" y2="460" stroke-width="0.51"></line> <line x1="520" y1="465" x2="740" y2="84" stroke-width="1.35"></line> <circle cx="535" cy="480" r="3"></circle> <line x1="535" y1="480" x2="520" y2="465" stroke-width="0.78"></line> <line x1="535" y1="480" x2="916" y2="260" stroke-width="0.87"></line> <circle cx="540" cy="500" r="3"></circle> <line x1="540" y1="500" x2="535" y2="480" stroke-width="1.09"></line> <line x1="540" y1="500" x2="980" y2="500" stroke-width="1.09"></line> <circle cx="535" cy="520" r="3"></circle> <line x1="535" y1="520" x2="540" y2="500" stroke-width="0.27"></line> <line x1="535" y1="520" x2="916" y2="740" stroke-width="1.29"></line> <circle cx="520" cy="535" r="3"></circle> <line x1="520" y1="535" x2="535" y2="520" stroke-width="1.39"></line> <line x1="520" y1="535" x2="740" y2="916" stroke-width="1.04"></line> <circle cx="500" cy="540" r="3"></circle> <line x1="500" y1="540" x2="520" y2="535" stroke-width="0.46"></line> <line x1="500" y1="540" x2="500" y2="980" stroke-width="0.9"></line> <circle cx="480" cy="535" r="3"></circle> <line x1="480" y1="535" x2="500" y2="540" stroke-width="0.71"></line> <line x1="480" y1="535" x2="260" y2="916" stroke-width="1.43"></line> <circle cx="465" cy="520" r="3"></circle> <line x1="465" y1="520" x2="480" y2="535" stroke-width="0.28"></line> <line x1="465" y1="520" x2="84" y2="740" stroke-width="1.11"></line> <circle cx="460" cy="500" r="3"></circle> <line x1="460" y1="500" x2="465" y2="520" stroke-width="0.25"></line> <line x1="460" y1="500" x2="20" y2="500" stroke-width="1.11"></line> </g><g> <circle cx="420" cy="500" r="3"></circle> <circle cx="431" cy="460" r="3"></circle> <line x1="431" y1="460" x2="420" y2="500" stroke-width="1.06"></line> <circle cx="460" cy="431" r="3"></circle> <line x1="460" y1="431" x2="431" y2="460" stroke-width="0.4"></line> <circle cx="500" cy="420" r="3"></circle> <line x1="500" y1="420" x2="460" y2="431" stroke-width="0.5"></line> <circle cx="540" cy="431" r="3"></circle> <line x1="540" y1="431" x2="500" y2="420" stroke-width="0.58"></line> <circle cx="569" cy="460" r="3"></circle> <line x1="569" y1="460" x2="540" y2="431" stroke-width="1.32"></line> <circle cx="580" cy="500" r="3"></circle> <.........完整代码请登录后点击上方下载按钮下载查看
网友评论0