Hello, everyone. I want to make a bad response on the web, so I wrote a paragraph of javascript and inserted it in html:
<img class="graphic_001" src="img/parallax_graphic/tri-yellow.svg"/>
<script type="text/javascript">
function parallex () {
var img = window.pageYOffset;
var a = document.getElementsByClassName("graphic_001");
var speed = 0.8;
a.style.top = img * speed +"px";
}
window.addEventListener("scroll",parallex);
</script>
but after opening the browser, the explorer failed to catch the top, of the clip and will report as soon as it is activated:
how should I correct the javascript if I want to? At present, confirm that the video has been posted on the web, please listen to your answers!