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

189
Views
cuando asigno el valor del ancho de línea a 100, muestra el ancho de línea predeterminado en el navegador para la forma del rectángulo

el ancho de línea de la caja interna sigue siendo el mismo para los diferentes valores en el archivo main.js

principal.js

 enter code here function init(){ let ctx = document.querySelector('#canvas').getContext('2d'); ctx.strokeRect(100,50,200,150); ctx.lineWidth = 100; }

índice.html

 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Drawing on the canvas</title> <link rel="stylesheet" href="styles.css"> <script src="main.js"></script> </head> <body onload="init();"> <canvas id="canvas" width="400" height="300">Your browser doesn't support the HTML5 element canvas. </canvas> </body> </html>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Solo necesita cambiar el orden de las instrucciones individuales

 ctx.strokeRect(100,50,200,150); ctx.lineWidth = 100;

a

 ctx.lineWidth = 100; ctx.strokeRect(100,50,200,150);
about 4 years ago · Juan Pablo Isaza Report
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!