I have a question how can I draw a line inside the rectangle using svg please make it easy so I can understand better | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

I have a question how can I draw a line inside the rectangle using svg please make it easy so I can understand better

25th Sep 2020, 8:47 PM
Lora Hazel
Lora Hazel - avatar
3 Antworten
+ 3
<body> <style> div{ height:200px; width:200px; background-color:red; } </style> <div> <svg height="100%" width="100%"> <line x1="10" y1="10" x2="150" y2="150" stroke="black"/> </svg> </div> </body>
25th Sep 2020, 9:08 PM
Abhay
Abhay - avatar
+ 3
<svg> <rect x="20" y="50" width="300" height="200" fill="green"></rect> <line x1="40" y1="80" x2="240" y2="80" stroke="red" stroke-width="4px"></line> </svg>
26th Sep 2020, 12:36 AM
Divya Mohan
Divya Mohan - avatar
+ 1
Thank youuu very much
26th Sep 2020, 2:25 PM
Lora Hazel
Lora Hazel - avatar