[html] view plain copy
<!DOCTYPE html>
<html>
<head>
<title>js中常用追加元素的几种方法</title>
<style>
.container {
width: 1200px;
padding: 10px;
margin: 50px auto;
border: 1px solid lightcoral;
}
#wrap{
border: 1px solid lightseagreen;
}
.container p{
height: 30px;
line-height: 30px;
}
.btn-group{
margin-top: 20px;
}
button{
width: 80px;
height: 32px;
margin-right: 10px;
line-height: 32px;
text-align: center;
border: 0px;
}
</style>
</head>
<body>
我是第一个子元素</p>
我是第二个子元素</p>
</div>
</div>
</div>
</body>
</html>