I'm making a code where I need to get an image drawn only once. I've got the url, but none of the suggestions in the StackOverflow about how to get it is working in the Sololearn console. It'll be very cool if someone helped🙂
//Please inform me if further details is required
Humayra Islam 🇧🇩🦄 you can do it by like this
<img src="ingredients.png" id="i">
Inside script tag
var img = document.getElementById("i");
For setting width
img.style.width = size +"px";
Just same things for height
img.style.height = size +"px";
you can use many other properties by using it
if you are using any framework then it is much easier
hope this helps you
for more info mention me here
It starts with the <svg> tag, determines the circle properties with the <circle> whose attributes are cx (position on the evaluated axis), cy (position on the axis). ordinate), r (radius), and fill.
For drawing the rectangle, the <rect> tag with its attributes, x (position in advertised), y (position in the ordinate axis), width (width), height (height), stroke (contour line) and fill ( fill).
Then they wrap the <svg> tag and the html tags. Such <circle> and <rect> do not need to be enclosed with the same text. Just use />.
Functions and Parameters
In such a <body> he launches the image and the oneclick event (aumented size) with the image and id "logo" function. Then the ondblclick event with the normal size function. Then determine the cursor model.