Commit e102a2f 1 parent a290d0f commit e102a2f Copy full SHA for e102a2f
File tree 1 file changed +28
-33
lines changed
1 file changed +28
-33
lines changed Original file line number Diff line number Diff line change 5
5
< meta charset ="UTF-8 ">
6
6
< meta name ="viewport " content ="width=device-width, initial-scale=1 ">
7
7
< title > Note</ title >
8
- </ head >
9
- < style >
10
- @import url ('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap' );
11
-
12
- html ,
13
- body {
14
- margin : 0 ;
15
- padding : 0 ;
16
- height : 100% ;
17
- }
8
+ < style >
9
+ @import url ('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap' );
18
10
19
- body {
20
- display : flex;
21
- flex-direction : column;
22
- justify-content : center;
23
- align-items : center;
24
- }
11
+ html ,
12
+ body ,
13
+ textarea {
14
+ margin : 0 ;
15
+ padding : 0 ;
16
+ height : 100% ;
17
+ }
25
18
26
- textarea {
27
- font-family : 'Open Sans' ;
28
- width : 90% ;
29
- height : 90% ;
30
- border : none;
31
- resize : none;
32
- outline : none;
33
- }
34
- </ style >
19
+ textarea {
20
+ font-family : 'Open Sans' ;
21
+ width : 90% ;
22
+ height : 90% ;
23
+ padding : 5% ;
24
+ border : none;
25
+ resize : none;
26
+ outline : none;
27
+ }
28
+ </ style >
29
+ </ head >
35
30
36
31
< body >
37
32
< textarea placeholder ="Click here to type "> </ textarea >
33
+ < script >
34
+ const text = document . querySelector ( 'textarea' ) ;
35
+ text . value = localStorage . getItem ( 'key' ) ;
36
+ text . oninput = ( ) => {
37
+ localStorage . setItem ( 'key' , text . value ) ;
38
+ }
39
+ </ script >
38
40
</ body >
39
- < script >
40
- const text = document . querySelector ( 'textarea' ) ;
41
- text . value = localStorage . getItem ( 'key' ) ;
42
- text . oninput = ( ) => {
43
- localStorage . setItem ( 'key' , text . value ) ;
44
- }
45
- </ script >
46
41
47
- </ html >
42
+ </ html >
You can’t perform that action at this time.
0 commit comments