-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfont.html
More file actions
61 lines (58 loc) · 1.79 KB
/
font.html
File metadata and controls
61 lines (58 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Adjust Paragraph Size</title>
<style>
@font-face {
font-family: 'Aurorasoft Sans Serif A';
src: url(./sys6/assansserif.ttf);
}
@font-face {
font-family: 'Aurorasoft Sans Serif B';
src: url(./sys6/aurorss.ttf);
font-weight: 400;
}
@font-face {
font-family: 'Aurorasoft Sans Serif B';
src: url(./sys6/aurorssb.ttf);
font-weight: 700;
}
.p1a {
font-family: 'Aurorasoft Sans Serif A';
font-weight: 400;
}
.p1b {
font-family: 'Aurorasoft Sans Serif A';
font-weight: 700;
}
.p1c {
font-family: 'Aurorasoft Sans Serif B';
font-weight: 400;
}
.p1d {
font-family: 'Aurorasoft Sans Serif B';
font-weight: 700;
}
</style>
</head>
<body>
<input type="range" id="fontSizeSlider" min="10" max="50" value="16">
<label for="fontSizeSlider">Adjust Paragraph Size</label>
<p class="p1a">Lorem ipsum dolor sit amet.</p>
<p class="p1b">Lorem ipsum dolor sit amet.</p>
<p class="p1c">Lorem ipsum dolor sit amet.</p>
<p class="p1d">Lorem ipsum dolor sit amet.</p>
<script>
const slider = document.getElementById('fontSizeSlider');
const paragraphs = document.querySelectorAll('p');
slider.addEventListener('input', function() {
const newSize = slider.value + 'px';
paragraphs.forEach(p => {
p.style.fontSize = newSize;
});
});
</script>
</body>
</html>