Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6d49bd2

Browse files
Merge pull request #49 from AzharAli-github/main
DOM-CSS
2 parents 80f5a2a + 20f1e9b commit 6d49bd2

File tree

4 files changed

+49
-0
lines changed

4 files changed

+49
-0
lines changed
4.15 KB
Loading[フレーム]
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<title>DOM-CSS</title>
9+
<link rel="stylesheet" href="style.css">
10+
</head>
11+
12+
<body>
13+
<h1>DOM CSS</h1>
14+
<h2>Example One</h2>
15+
<p id="textOne">Hello there</p>
16+
<button onclick="DisplayOne()">Click</button>
17+
<h2>Example Two</h2>
18+
<p id="textTwo">Hello there</p>
19+
<button onclick="DisplayTwo()">Click</button>
20+
<h2>Example Three</h2>
21+
<p id="textThree">Hello there</p>
22+
<button onclick="DisplayThree()">Click</button>
23+
<script src="script.js"></script>
24+
</body>
25+
26+
</html>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
let textOne = document.getElementById('textOne');
2+
3+
function DisplayOne() {
4+
textOne.style.color = "red";
5+
}
6+
7+
let textTwo = document.getElementById('textTwo');
8+
9+
function DisplayTwo() {
10+
textTwo.style.fontSize = "30px";
11+
}
12+
13+
let textThree = document.getElementById('textThree');
14+
15+
function DisplayThree() {
16+
textThree.style.fontFamily = "monospace";
17+
textThree.style.fontSize = "30px";
18+
textThree.style.color = "blue";
19+
textThree.style.fontWeight = "700";
20+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
h2 {
2+
font-family: monospace;
3+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /