svg栅格化拖动调整三角形定点效果代码
代码语言:html
所属分类:拖放
代码描述:svg栅格化拖动调整三角形定点效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { background: #222; color: #fff; margin: 0; height: 100vh; display: flex; justify-content: center; align-items: center; } svg { touch-action: none; width: 90vmin; height: 90vmin; border: 1px solid #fff; } svg circle { cursor: pointer; } </style> </head> <body> <svg viewBox="-64 -64 128 128"> <rect x="-64" y="-64" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-56" y="-64" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-48" y="-64" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-40" y="-64" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-32" y="-64" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-24" y="-64" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-16" y="-64" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-8" y="-64" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="0" y="-64" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="8" y="-64" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="16" y="-64" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="24" y="-64" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="32" y="-64" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="40" y="-64" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="48" y="-64" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="56" y="-64" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-64" y="-56" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-56" y="-56" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-48" y="-56" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-40" y="-56" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-32" y="-56" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-24" y="-56" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-16" y="-56" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-8" y="-56" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="0" y="-56" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="8" y="-56" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="16" y="-56" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="24" y="-56" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="32" y="-56" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="40" y="-56" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="48" y="-56" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="56" y="-56" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-64" y="-48" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-56" y="-48" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-48" y="-48" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-40" y="-48" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-32" y="-48" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-24" y="-48" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-16" y="-48" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-8" y="-48" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="0" y="-48" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="8" y="-48" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="16" y="-48" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="24" y="-48" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="32" y="-48" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="40" y="-48" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="48" y="-48" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="56" y="-48" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-64" y="-40" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-56" y="-40" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-48" y="-40" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-40" y="-40" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-32" y="-40" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-24" y="-40" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-16" y="-40" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-8" y="-40" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="0" y="-40" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="8" y="-40" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="16" y="-40" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="24" y="-40" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="32" y="-40" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="40" y="-40" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="48" y="-40" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="56" y="-40" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-64" y="-32" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-56" y="-32" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-48" y="-32" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-40" y="-32" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-32" y="-32" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-24" y="-32" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-16" y="-32" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-8" y="-32" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="0" y="-32" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="8" y="-32" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="16" y="-32" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="24" y="-32" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="32" y="-32" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="40" y="-32" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="48" y="-32" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="56" y="-32" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-64" y="-24" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-56" y="-24" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-48" y="-24" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-40" y="-24" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-32" y="-24" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-24" y="-24" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-16" y="-24" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-8" y="-24" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="0" y="-24" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="8" y="-24" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="16" y="-24" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="24" y="-24" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="32" y="-24" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="40" y="-24" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="48" y="-24" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="56" y="-24" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-64" y="-16" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-56" y="-16" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-48" y="-16" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-40" y="-16" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-32" y="-16" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-24" y="-16" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-16" y="-16" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-8" y="-16" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="0" y="-16" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="8" y="-16" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="16" y="-16" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="24" y="-16" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="32" y="-16" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="40" y="-16" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="48" y="-16" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="56" y="-16" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-64" y="-8" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-56" y="-8" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-48" y="-8" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-40" y="-8" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-32" y="-8" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-24" y="-8" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-16" y="-8" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-8" y="-8" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="0" y="-8" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="8" y="-8" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="16" y="-8" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="24" y="-8" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="32" y="-8" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="40" y="-8" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="48" y="-8" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="56" y="-8" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-64" y="0" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-56" y="0" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-48" y="0" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-40" y="0" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-32" y="0" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-24" y="0" width="8" height="8" fill="none" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-16" y="0" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="-8" y="0" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="0" y="0" width="8" height="8" fill="#f0f" stroke="#444" vector-effect="non-scaling-stroke"></rect> <rect x="8" y="0" width="8" height="8" fill="#f0f".........完整代码请登录后点击上方下载按钮下载查看
网友评论0