Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

265
Views
How to add background, and border as svg images to a rect element

I have the following code which draws a rect element on the svg box with blue background and pink boarder. I would like to change the blue background with an .svg image and the pink boarder with another .svg image.

 //how to put the border around the SVG element
   var borderRect = document.createElementNS('http://www.w3.org/2000/svg','rect');
   borderRect.setAttribute("id", "bRect");
   borderRect.setAttribute("width", bb.width);
   borderRect.setAttribute("height", newVboxH);
   borderRect.setAttribute("x", bb.x);
   borderRect.setAttribute("y", bb.y);
   borderRect.setAttribute("style","fill:blue;stroke:pink;stroke-width:5;fill-opacity:0.1;stroke-opacity:0.9");
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!