I am currently learning AnimeJS but I am having a problem with the animation.
Basically, what is happening is that when I run a simple html
that contains css styles and a javascript script on my localhost
, the website is skipping a portion of the `
Here is my entire code:
<!DOCTYPE html>
<html>
<head>
<title>AnimeJS</title>
</head>
<style>
div {
background-color: red;
width: 100px;
height: 100px;
}
</style>
<body>
<div></div>
</body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha512-z4OUqw38qNLpn1libAN9BsoDx6nbNFio5lA6CuTp9NlK83b89hgyCVq+N5FdBJptINztxn1Z3SaKSKUS5UP60Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script >
anime({
targets: 'div',
translateX: 250,
duration: 1000,
});
</script>
</html>
Here is the localhost version:
And here is the version when I just open the index.html
normally (locally) without localhost
Any suggestions as to what I am doing wrong and/or what I need to change in order for my localhost to work properly?