SVG 矩形边框宽度

发布于 2024-11-25 00:11:35 字数 92 浏览 0 评论 0原文

是否可以像 border-left-widthborder-right-width 等一样操作 SVG 矩形的边框?

Is it possible to manipulate SVG rect's borders in the same way as it border-left-width, border-right-width and so on does?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

毅然前行 2024-12-02 00:11:36

既然你问了,答案恐怕是否定的。如果您想有选择地更改矩形的边,则必须将其绘制为四条单独的线。

Since you asked, the answer, I'm afraid is no. If you want to selectively change the sides of a rectangle, you'll have to draw it as four separate lines.

萌吟 2024-12-02 00:11:35

尝试这个并将其更改为您的。

<svg width="400" height="110"> 
   <rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:3;stroke:rgb(0,0,0)" /> 
</svg>

try this and change it as yours.

<svg width="400" height="110"> 
   <rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:3;stroke:rgb(0,0,0)" /> 
</svg>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文