Colored outlines of Shapes In JS | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Colored outlines of Shapes In JS

I know how to fill the color of a shape and everything like that, but if I want the outline of lets say a rectangle to be blue instead of standard black what command would I use?

7th Jun 2017, 8:24 PM
Christopher Carlson
Christopher Carlson - avatar
1 Answer
+ 1
Use border in CSS: border: solid #000000 3px; This makes a solid border (not a dotted border or anything), black outline of 3px width. You can also use border-color to change just the color or only fill in the border element of border
7th Jun 2017, 8:29 PM
Maart
Maart - avatar