svg - SVG 水平线太大
问题描述
我尝试使用 html/svg 绘制形状。这是一个音量控制,见下文
<svg height="20" width="90" style="background-color: #ccc;">
<g>
<rect x="10" y="0" width="80" height="20" style="stroke: #000; stroke-width: 1; fill: #fff;"></rect>
<!-- Example two of four -->
<polygon points="10,20 50,10 50,20" style="fill: rgba(128,128,128,128)"></polygon>
<line x1="30" y1="0" x2="30" y2="20" style="stroke: #000; stroke-width: 1;"></line>
<line x1="50" y1="0" x2="50" y2="20" style="stroke: #000; stroke-width: 1;"></line>
<line x1="70" y1="0" x2="70" y2="20" style="stroke: #000; stroke-width: 1;"></line>
</g>
</svg>
所有浏览器都绘制双倍宽度的水平线,除了最后一个。我什至添加了“stroke-width: 1”,但这不起作用。
我猜抗锯齿?我怎样才能解决这个问题?
解决方案
推荐阅读
- python - 如何通过python在SQL中插入多行数据?
- api - 获取 Github 存储库提交数的 API?
- python - 如何计算 Elasticsearch 中的出现次数
- visual-c++ - 如何将 GetProfileBinary 的结果保存到智能指针中?
- javascript - 使用 Tesseract.js 库保留缩进
- orchardcms - Orchard-Core 上的 GraphiQL:“where”和“filter”不起作用
- linux - 如何在 linux ubuntu 中注册我的自定义应用程序?
- reactjs - 动态改变 Image -> React 组件
- python - 如何将字符串 2021-09-30_1 转换为日期时间
- jasper-reports - 无法使用从日期时间字符串计算的变量对日期时间进行排序