File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1414
1515
1616 margin-top : 45vh ;
17- border : 2px red solid;
17+ border : 2px rgb ( 20 , 16 , 16 ) solid;
1818 display : flex ;
1919 flex-direction : column;
2020 gap : 20px ;
2121 justify-content : space-around;
2222 padding : 20px ;
2323 align-items : center;
24+ width : 50% ;
25+ margin-left : auto;
26+ margin-right : auto;
27+ border-radius : 10px ;
2428
2529 }
2630 .btn_container {
@@ -67,10 +71,14 @@ <h1>Simple Example of Event Listener</h1>
6771
6872 // Add an event listener to the button
6973 buttonRed . addEventListener ( "click" , function ( ) {
74+ bg . style . color = "black" ;
75+
7076 bg . style . backgroundColor = "red" ;
7177 } ) ;
7278 buttonBlue . addEventListener ( "click" , function ( ) {
7379 bg . style . backgroundColor = "blue"
80+ bg . style . color = "white"
81+ bg . style . border = "2px solid white"
7482 } )
7583
7684
You can’t perform that action at this time.
0 commit comments