在教程之后 - 类js被添加到html中 - 但由于某种原因,没有创建按钮.我做了多次尝试,尝试重写代码一千次,寻找任何小的拼写错误,但没有.它直接取自教程,所以我看不出有什么问题.
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>fww</title>
<style>
body {
width: 600px;
margin: auto;
font-family: sans-serif;
}
#contact {
background: #e3e3e3;
padding: 1em 2em;
position: relative;
}
.js #contact {
position: absolute;
top: 0;
width: inherit;
display: none;
}
#contact h2 {
margin-top: 0;
}
#contact ul {
padding: 0;
}
#contact li {
list-style: none;
margin-bottom: 1em;
}
/* Close button on form */
.close {
position: absolute;
right: 10px;
top: 10px;
font-weight: bold; …Run Code Online (Sandbox Code Playgroud)