Seeking assistance with my portfolio as I delve into the world of Webdesign and learn the basics from templates. How can I integrate this javascript code into the background of my site, replacing the current minecraft image?
Every attempt to implement it results in breaking the entire page for unknown reasons.
Regards,
The code I wish to implement: https://codepen.io/towc/pen/eNEBQX (provided below)
HTML:
<canvas id=c></canvas>
<a href=http://hd4desktop.com/669-colours-circle-rainbow-hd-wallpaper/>
<img src=http://hd4desktop.com/images/m/a-colours-circle-rainbow-HDWallpaper.jpg ></a>
CSS:
body {
overflow: hidden;
}
canvas {
position: absolute;
top: 0;
left: 0;
background-color: black;
}
a {
width: 200px;
height: 200px;
position: absolute;
left: calc(100% - 200px);
top: calc(100% - 130px);
}
img {
width: 200px;
}
JS:
// JavaScript code provided at the given link
// For more details and troubleshooting, visit the link
...
Link to my current site (WARNING: AUTOPLAY MUSIC)
I am concerned about potential conflicts between the new CSS and existing styles on my site.
Feel free to inquire if more information is needed!
Thank you for your help!