我有一个文本框,它会在页面加载时初始点击时移动。这很奇怪,似乎有点问题,我什至不知道从哪里开始调试。
有没有人遇到过这种情况?
这是一张图片。白框立即返回到文本区域并且文本区域很好。它仅在初始点击时初始加载。
这是我的html
.textarea {
display: block;
height: 100px;
width: 100%;
font-size: 24px;
}
.container {
width: 100%;
padding-top: 50px;
text-align: center;
}
.title {
color: #fdfdfd;
font-size: 55px;
margin-top: 50px;
text-align: center;
margin-bottom: 30px;
}
.label {
color: seagreen;
font-size: 19px;
}
.input {
width: 100%;
height: 45px;
font-size: 24px;
line-height: 45px;
}
.form-group {
width: 100%;
text-align: left;
margin-bottom: 20px;
}
.form {
width: 500px;
margin: 0 auto;
}
.submit {
font-family: Chalk-c1;
width: 300px;
height: 43px;
font-size: 24px;
color: #fdfdfd;
background-color: rebeccapurple;
border: none;
border-radius: 4%;
cursor: pointer;
}
.textarea {
display: block;
height: 100px;
width: 100%;
font-size: 24px;
}
html {
background-color: #111;
font-family: Chalk-c1;
color: #fdfdfd;
margin: 0;
padding: 0;
}
body {
margin: 0;
padding: 0;
}
<div class="container">
<div class="title">Contact</div>
<div class="form">
<div class="form-group">
<label for="name" class="label">Name</label><br>
<input type="text" class="input" id="name" placeholder="John Doe">
</div>
<div class="form-group">
<label for="email" class="label">Email</label><br>
<input type="text" class="input" id="email" placeholder="john.doe@gmail.com">
</div>
<div class="form-group">
<label for="message" class="label">Message</label>
<textarea id="message" class="textarea" placeholder="How can we help you ... ?"></textarea>
</div>
</div>
<button class="submit">Send Message</button>
</div>
最佳答案
我认为这是因为语法插件。一旦我遇到这种问题,但是当我关闭那个插件时,我就解决了。所以只要检查这是否有效..
关于html - Textarea 框在点击初始页面加载时移动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47957205/