File tree 2 files changed +93
-0
lines changed
78-speak number guessing game
2 files changed +93
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!-- Reference: https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition -->
2
+
3
+ <!DOCTYPE html>
4
+ < html lang ="en ">
5
+ < head >
6
+ < meta charset ="UTF-8 " />
7
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
8
+ < link rel ="stylesheet " href ="style.css " />
9
+ < title > Speak Number Guess</ title >
10
+ </ head >
11
+ < body >
12
+ < img
13
+ src ="https://image.flaticon.com/icons/svg/3787/3787697.svg "
14
+ alt ="Speak "
15
+ />
16
+ < h1 > Guess a Number Between 1 - 100</ h1 >
17
+ < h2 > Speak the number into your microphone</ h2 >
18
+ < div id ="msg " class ="msg "> </ div >
19
+ < script src ="script.js "> </ script >
20
+ </ body >
21
+ </ html >
Original file line number Diff line number Diff line change
1
+ @import url ("https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" );
2
+
3
+ * {
4
+ box-sizing : border-box;
5
+ }
6
+
7
+ body {
8
+ background : # 27273d url ('https://images.unsplash.com/photo-1534595461757-4974c5072dff?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80' ) no-repeat center center/cover;
9
+ color : rgba (255 , 255 , 255 , 0.87 );
10
+ font-family : "Roboto" , sans-serif;
11
+ display : flex;
12
+ flex-direction : column;
13
+ align-items : center;
14
+ justify-content : center;
15
+ text-align : center;
16
+ height : 100vh ;
17
+ overflow : hidden;
18
+ margin : 0 ;
19
+ }
20
+
21
+ body ::after {
22
+ content : '' ;
23
+ background-color : rgba (0 , 0 , 0 , 0.7 );
24
+ position : absolute;
25
+ top : 0 ;
26
+ left : 0 ;
27
+ width : 100% ;
28
+ height : 100% ;
29
+ }
30
+
31
+ body * {
32
+ z-index : 1 ;
33
+ }
34
+
35
+ img {
36
+ width : 16rem ;
37
+ height : 16rem ;
38
+ }
39
+
40
+ h1 , h2 {
41
+ margin-bottom : 0 ;
42
+ }
43
+
44
+ h2 {
45
+ font-size : 1.17rem ;
46
+ }
47
+
48
+ p {
49
+ line-height : 1.5 ;
50
+ margin : 0 ;
51
+ }
52
+
53
+ .play-again {
54
+ padding : 0.5rem 1rem ;
55
+ border : 0 ;
56
+ background-color : # f4f4f4 ;
57
+ border-radius : 5px ;
58
+ margin-top : 0.625rem ;
59
+ }
60
+
61
+ .msg {
62
+ font-size : 1.5rem ;
63
+ margin-top : 2.5rem ;
64
+ }
65
+
66
+ .box {
67
+ border : 1px solid # dedede ;
68
+ display : inline-block;
69
+ font-size : 1.875rem ;
70
+ margin : 1.25rem ;
71
+ padding : 0.625rem ;
72
+ }
You can’t perform that action at this time.
0 commit comments