File tree Expand file tree Collapse file tree 3 files changed +76
-0
lines changed Expand file tree Collapse file tree 3 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 1+ const btn = document . querySelector ( "#emoji" ) ;
2+ const emojis = [
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+ btn . addEventListener ( "mouseover" , ( ) => {
40+ btn . innerHTML = emojis [ Math . floor ( Math . random ( ) * emojis . length ) ] ;
41+ } ) ;
Original file line number Diff line number Diff line change 1+ < html lang ="en ">
2+ < head >
3+ < meta charset ="UTF-8 " />
4+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge " />
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
6+ < title > Random Emojies</ title >
7+ < link rel ="stylesheet " href ="style.css " />
8+ </ head >
9+ < body >
10+ < div id ="emoji "> 🤣</ div >
11+
12+ < script src ="app.js "> </ script >
13+ </ body >
14+ </ html >
Original file line number Diff line number Diff line change 1+ body {
2+ height : 100vh ;
3+ display : flex;
4+ flex-direction : column;
5+ justify-content : center;
6+ align-items : center;
7+ background : # ccc ;
8+ }
9+
10+ # emoji {
11+ font-size : 10rem ;
12+ filter : grayscale (1 );
13+ transition-property : transfrom, filter;
14+ transition-duration : 200ms ;
15+ cursor : pointer;
16+ }
17+
18+ # emoji : hover {
19+ transform : scale (1.3 );
20+ filter : grayscale (0 );
21+ }
You can’t perform that action at this time.
0 commit comments