Skip to content

Commit

Permalink
fixed image bug
Browse files Browse the repository at this point in the history
  • Loading branch information
iguannalin committed Jul 31, 2023
1 parent c1a8ddb commit d72abec
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion index.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ body {
width: 100%;
}

#greeting img {
#wallpaper {
content: url("public/wallpaper.png");
margin-left: 4.5%;
clip-path: circle(44% at 49% 56%);
width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ <h4>about this website</h3>
</div>
<div id="center">
<div id="greeting">
<img id="wallpaper" src="public/wallpaper.png"/>
<img id="wallpaper"/>
</div>

<!-- CODE -->
Expand Down
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,13 @@ window.addEventListener("load", () => {
function oops(ev) {
oopsies.onclick = null;
const wp = document.getElementById("wallpaper");
const temp = wp.src;
wp.src = "public/anna.jpg";
const temp = wp.style.content;
wp.style.content = "url('public/anna.jpg')";
console.log(wp.style.content)
switchView(center, false);
setTimeout(() => {
wp.src= temp;
console.log(temp)
wp.style.content = temp;
oopsies.onclick = (ev) => oops(ev);
}, 350);
}
Expand Down

0 comments on commit d72abec

Please sign in to comment.