我有一个textarea框,在页面加载时初始点击时移动.这很奇怪,似乎有点儿麻烦,我甚至不知道从哪里开始调试.
有谁之前经历过这个吗?
这是一张图片.白色的盒子立即回到textarea,textarea很好.它仅在初始点击时初始加载.
这是我的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;
}Run Code Online (Sandbox Code Playgroud)
<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>Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1170 次 |
| 最近记录: |