-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreact02.html
56 lines (39 loc) · 1 KB
/
react02.html
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
55
56
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Go React</title>
<style>
.TagBG {
background-color: gold;
}
.TagFont {
font-size: 72px;
font-family: fantasy;
text-align: center;
border-radius: 50px;
}
</style>
</head>
<body>
<div id="mydiv">Der Text verschwindet</div>
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/[email protected]/babel.min.js"></script>
<script type="text/babel">
class Same extends React.Component {
render() {
return <h1>Spiderman</h1>
}
}
ReactDOM.render(
<div className="TagBG TagFont">
<Same /></div>,
document.getElementById("mydiv")
);
</script>
</body>
</html>