Detailed analysis of dapp development and writing web front-end pages:
Create a folder named First DApp, and create an index.html file under the First DApp directory:
<html>
<head>
<!--Specify file encoding format-->
<meta charset="UTF-8">
<title>First DApp</title>
<!--Introduce css file-->
<link rel= "stylesheet" type="text/css" href="main.css">
</head>
<body>
<div class="container">
<h1>First DApp</h1>
<!--Set id to insert And read data -->
<h2 id="info"></h2>
<label>Name:</label>
<input id="name" type="text">
<label>Age:</label>
<input id="age" type="text">
<button id="button">更新</button>
</div>
</body>
</html>
Set the page style and create the main.css file in the First DApp directory:
body {
background-color: deepskyblue;
}
.container {
width: 50%;
margin: 0 auto;
}
#info {
background-color: red;
}
The above are the detailed knowledge points for writing front-end pages.