-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
54 lines (43 loc) · 1.46 KB
/
main.js
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
//sur le js
function changecss() {
//alert('hello');
document.querySelectorAll('h1, h2, h3,h4').forEach(tag =>
tag.style.cssText = `
color: green;
fontFamily: Comic Sans MS, cursive;
`
)
document.querySelectorAll('p').forEach(tag =>
tag.style.cssText = `
color: blue;
fontFamily: papyrus, Fantasy;
`
)
document.querySelectorAll('body').forEach(tag =>
tag.style.cssText = `
background-color: magenta;
`
)
}
document.getElementById('button').button.onclick = changecss();
//document.getElementById('button').button.onclick = false;
// document.getElementById("myH2").style.color = "#ff0000";
// document.getElementById("myP").style.color = "magenta";
// document.getElementById("myP2").style.color = "blue";
// document.getElementById("myDiv").style.color = "lightblue";
// $(document).ready(function(){
// $('button').css("color","blue");
// $('h1').css("font-size","25px");
//$('p').css("margin-left","15px");
//$('h1').css("font-family","Comic Sans");
//$('h1').css("color","green");
//$('h2').css("color","green");
//$('h3').css("color","green");
//$('body').css("background-color","magenta");
//$('p').css("color","blue");
//$('p').css("font-family","papyrus");
//$('h1').css("font-family","Comic Sans");
//$('h2').css("font-family","comic-sans");
//$('h3').css("font-family","comic-sans");
// });
//font-family: "Comic Sans MS", "Comic Sans", cursive;