+ 1
How can i insert a picture
2 Respuestas
+ 2
Ibrahim Aliyu Tahir Would help if you provided some more context for your question on exactly what effect you are attempting.
I am going to assume you are wanting to display a picture on a webpage which was not there initially.
👉 If <img> element was not already part of the page, you need Javascript to add it to the DOM.
document.getElementById('container-id').innerHTML += '<img src="https://www.example.com/image.jpg" alt="some image">'
👉 if image already part of DOM and you want to make it visible, you can use variety of CSS properties to do this.
You can also animate those properties so that the image appears over time.
Such as fading into view using opacity.
Or cross-fade from one image to another using overlapping images, z-index, and/or borders.
+ 1
Part of animation use CSS. Add @keyframe and use class with tag <div> and <img> for set animation in CSS.
<div class="<exampleanimation1>">
<img class="<exampelimg1>" src="<url>"/>
</div>