You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!DOCTYPEhtml><htmllang="en"><head><style>
.p {color: black;}
@media screen and (min-width: 350px) {.p{color: blue;}}
@media screen and (min-width: 1024px) {.p{color: red;}}</style></head><body><pclass="p">我的網頁</p></body></html>
第四題:
<html><body><imgId="pic"src="https://fakeimg.pl/150x130"><buttonId="on">顯示圖片</button><buttonId="off">關閉圖片</button></body><script>
let pic = document.getElementById('pic');
let on = document.getElementById('on');
let off = document.getElementById('off');
on.addEventListener('click',()=>{pic.style.display='block';})
off.addEventListener('click',()=>{pic.style.display='none';})
</script></html>
第五題:
<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><title>Document</title></head><body><h3Id="word">我的網頁</h3><buttonId="black">變成黑色</button><buttonId="blue">變成藍色</button></body><script>
var word = document.getElementById('word');
var black = document.getElementById('black');
var blue = document.getElementById('blue');
black.addEventListener('click',()=>{word.style.color="black";})
blue.addEventListener('click',()=>{word.style.color="blue";})
</script></html>
第一題:
第二題:
第三題:
第四題:
第五題:
第六題:
延伸題:
第一題:
第二題:
第三題:
第四題:
第五題:
The text was updated successfully, but these errors were encountered: