[SVG] How to draw a rectangle?
2020-12-09 11:33:09 JST |
Web Design |
1k+ Reads
Copyright Notice: This article is an original work licensed under the CC 4.0 BY-NC-ND license.
If you wish to repost this article, please include the original source link and this copyright notice.
Source link: https://v2know.com/article/545
Previous: [SVG] How to draw a circle?
Code:
<svg >
<rect width="300" height="100" style="stroke:rgb(0,0,0);stroke-width:2;fill:transparent;" />
</svg>
<svg>
<rect width="300" height="100" stroke="black" stroke-width="2" fill="transparent" />
</svg>
Show results:
Why did I write two examples?
This is simply another way of writing that I want to tell you, which is written in "style", even though they are separate attributes.
stroke:rgb(0,0,0) ⇔ stroke=black
This is another way to show colors.
Next: [SVG] How to draw polygons?
This article was last edited at 2020-12-09 11:57:15 JST
Related Articles
Website Rebuild & Patch Notes
After months of planning and development, I'm excited to share the fully rebuilt version of my website. This update marks a major shift in both design and architecture — moving away from the legacy ASP.NET Core 2.1 MVC framework to a modern .NET 8 Blazor Web App, combining both Blazor Server and WebAssembly. In this post, I’ll highlight the
2025-03-24 15:32:25 JST
|
Web Design
|
117 reads 在a标签里面增加rel="noopener noreferrer"有什么用?
简单来讲,这样做是为了防止钓鱼网站。你的页面如果不加上这个rel="noopener"会被人链接到别的网站,原理:
2020-01-22 08:03:25 JST
|
Web Design
|
3k reads How to do blog donation function?
About CSS: The total number of images replaced is 3, which are quotation marks, radio1 and radio2 images The. Content class may conflict with your CSS. It is necessary to modify your style About JavaScript: No change required
2020-07-03 00:57:07 JST
|
Web Design
|
2k reads 博客打赏功能制作(附源码)及详细说明
关于CSS: 图片替换总数为3张,分别为引号、radio1、radio2图片 .content类可能与你的CSS冲突,有必要修改你的样式 关于JavaScript: 无需改动 关于HTML: alipay.jpg\wechat.jpg\alipayimg.png\wechatimg.png\close.jpg 要准备好 注意裁剪二维码,大小为140*140px
2020-06-13 18:23:18 JST
|
Web Design
|
2k reads Why not recommend you to use Blogger in 2020 (Specially for programmers)
As a programmer, I recommend that you write a blog yourself instead of using blogger. A few days ago, I used Blogger and I found its editor very difficult to use. Because I am a programmer, I need to paste the code, but the display of the code in Blogger is very bad. For example, the style I thought would work, but it didn't work on Blogger. I think the CSS style has been overwritten. So I opened
2020-12-14 16:46:06 JST
|
Web Design
|
2k reads 仿CSDN侧边栏滚轮响应脚本
这是本网站使用的,仿CSDN侧边栏滚轮响应脚本,需要先引入Jquery配合使用
2020-01-24 22:01:37 JST
|
Web Design
|
1k reads