Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If there is no style attribute present in the SVG element, you can add a CSS style to the element by either adding a class or an ID to it, and then applying the CSS style to that class or ID.

For example, if you add a class to the SVG element like this:

<svg class="double-border"></svg>

You can then apply a double border using CSS like this:

.double-border {
  border: 3px solid black;
  border-width: 3px 6px;
}

This will create a double border around the SVG element with a black color and a width of 3px and 6px, respectively.

Alternatively, if you add an ID to the SVG element like this:

<svg id="double-border"></svg>

You can apply the same CSS style to that ID like this:

#double-border {
  border: 3px solid black;
  border-width: 3px 6px;
}