Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经构建了一个用于放大/缩小 SVG 画布的前端工具,但是当我缩放时,任何 1 像素的笔划都会增加宽度(视觉上)。是否有 svg 设置可以确保 1px 笔画在缩放时保持 1px(视觉上)?我记得在某处读过它,但找不到资源。
尝试将vector-effect="non-scaling-stroke"属性添加到路径。在这里查看详细信息。我猜这就是你想要的?
vector-effect="non-scaling-stroke"