我的html中有两个输入标签,但它不允许我在其中输入任何内容。我不知道当你点击它们时它们的输入值是不可点击的。如果您将我的代码粘贴到您的IDE或您使用的任何内容尝试复制我的问题。没有什么能够输入值我不确定它是否与我已经实现的某些css有什么关系。
[
{
"message": "\"first_name\" is required",
"path": "first_name",
"type": "any.required",
"context": {
"key": "first_name"
}
},
{
"message": "\"last_name\" is required",
"path": "last_name",
"type": "any.required",
"context": {
"key": "last_name"
}
},
{
"message": "\"street\" is required",
"path": "address.street",
"type": "any.required",
"context": {
"key": "street"
}
},
{
"message": "\"zip\" is required",
"path": "address.zip",
"type": "any.required",
"context": {
"key": "zip"
}
},
{
"message": "\"state\" is required",
"path": "address.state",
"type": "any.required",
"context": {
"key": "state"
}
},
{
"message": "\"country\" is required",
"path": "address.country",
"type": "any.required",
"context": {
"key": "country"
}
}
]

body {
margin: 0;
padding: 0;
}
#box1 {
height: 100vh;
width: 100%;
background-image: url(http://bossfight.co/wp-content/uploads/2016/04/boss-fight-free-high-quality-stock-images-photos-photography-coffee-cup-glasses-macbook.jpg);
background-size: cover;
display: table;
background-attachment: fixed;
}
#backgroundnav {
/*background-color: #ADD8E6;*/
background-color: #989898;
height: 50px;
margin-top: -15px;
padding: 30px;
}
#content {
height: 600px;
}
nav ul li {
position: relative;
color: red;
font-size: 24px;
display: inline-block;
text-align: right;
margin-right: 40px;
text-decoration: none;
text-transform: uppercase;
font-family: 'Raleway';
font-weight: 900;
}
nav ul li a {
color: white;
text-decoration: none;
cursor: pointer;
}
nav ul li a:hover {
color: blue;
}
.navbar {
color: black;
text-align: center;
}
#content h1 {
font-family: 'Cabin';
font-size: 50px;
font-weight: bold;
margin-top: -10px;
color: black;
}
#content p {
font-size: 20px;
}
img {
text-align: center;
}
#left {
height: 450px;
width: 50%;
background-color: #989898;
float: left;
display: table-cell;
position: relative;
bottom: 130px;
font-size: 30px;
}
#right {
float: right;
height: 450px;
width: 50%;
background-color: #D2B48C;
display: table-cell;
position: relative;
bottom: 130px;
font-family: 'Raleway';
font-size: 30px;
}
#middle {
height: 80%;
}
ol li {
font-size: 40px;
color: white;
}
hr {
width: 115px;
color: #989898;
}
h1 {
font-size: 50px;
color: white;
vertical-align: middle;
font-family: 'Raleway';
text-align: center;
}
#wrap {
position: relative;
top: 250px;
}
#about h1 {
text-align: center;
position: relative;
top: 50px;
font-family: 'Raleway';
color: steelblue;
}
#aboutleft {
padding: 20px;
line-height: 25px;
margin-left: 400px;
margin-right: 400px;
position: relative;
right: 350px;
top: 20px;
font-family: 'Open Sans';
}
#aboutright {
padding: 20px;
line-height: 25px;
margin-left: 400px;
margin-right: 400px;
position: relative;
left: 350px;
bottom: 285px;
font-family: 'Open Sans';
}
#hr1 {
position: relative;
top: 20px;
width: 200px;
}
#projects h1 {
color: black;
}
#projects {
background-color: #99C4D2;
height: 1300px;
}
.align {
position: relative;
left: 129px;
bottom: 50px;
}
figure {
float: left;
width: 500px;
padding-bottom: 10px;
background-color: #EAEAEA;
}
figcaption {
text-align: center;
font-style: italic;
font-family: serif;
}
#projects h1 {
position: relative;
bottom: 70px;
}
#contact {
background-color: steelblue;
height: 700px;
}
form {
padding: 20px;
position: relative;
left: 130px;
top: 110px;
}
label {
font-size: 20px;
font-family: 'Roboto Slab';
width: 50px;
padding: 20px;
}
input {
height: 20px;
width: 200px;
}
fieldset {
background-color: white;
width: 75%;
padding: 25px;
margin-bottom: 15px;
}
legend {
position: relative;
bottom: 20px;
right: 9px;
font-size: 24px;
text-transform: uppercase;
}
h2 {
text-align: center;
font-size: 40px;
}

答案 0 :(得分:0)
你的问题在css中有所不同。在浏览器中打开您的页面,然后尝试检查输入框 - 您将看到它与h1标签重叠。因此,修复h1的大小 - 您将获得输入工作。
答案 1 :(得分:0)
你正在使你的H1职位相对。事实上,你的CSS中有很多过多的相对定位。 H1标签很大并且与页面的大部分重叠