Skip to content

Commit

Permalink
Update main.html
Browse files Browse the repository at this point in the history
  • Loading branch information
jihyerish authored Jun 24, 2024
1 parent b1656ee commit e1d4459
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions demos/target-text/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}

:target {
color : white;
color: white;
}

body::after {
Expand All @@ -34,7 +34,7 @@ <h3>Testing about getComputedStyle</h3>
const bodyElmStyle = getComputedStyle(document.body);
const pseudoAfterElmStyle = getComputedStyle(document.body, "::after");
const pseudoTargetTextElmStyle = getComputedStyle(document.body, "::target-text");
const target = getComputedStyle(document.body, "::target-text");
const targetStyle = getComputedStyle(document.body, ":target");

console.log(bodyElmStyle.content);
console.log(bodyElmStyle.backgroundColor);
Expand All @@ -44,6 +44,9 @@ <h3>Testing about getComputedStyle</h3>

console.log(pseudoTargetTextElmStyle.content);
console.log(pseudoTargetTextElmStyle.backgroundColor);

console.log(targetStyle.content);
console.log(targetStyle.color);
</script>
</body>
</html>

0 comments on commit e1d4459

Please sign in to comment.