0
當按下輸入/返回鍵時,我似乎已經失去了默認的textarea行爲。我想按下這個鍵將光標移動到下一行,但它只是插入一些空格。必須是我的CSS規則中的東西,但我不知道它是什麼。輸入/返回鍵沒有移動到textarea的新行
button, input, textarea, select {
outline: none;
box-shadow: none;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
-webkit-border-radius: 0;
border-radius: 0;
color: #3b3b3b;
font-family: inherit;
font-size: inherit;
text-decoration: none;
display: inline-block;
white-space: nowrap;
margin: 0;
padding: 0.2em 0.4em;
width: 100%;
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
border-width: 1px;
border-style: solid;
border-color: #d4d4d4;
background: #fff;
}
textarea {
height: 8em;
vertical-align: top;
overflow: auto;
}
<textarea id="Textarea1" placeholder="Text area"></textarea>
對我來說好像在鉻上在mac上 –
你使用什麼瀏覽器?有沒有任何CSS規則被繼承? – bdkopen
@bdkopen不,你可以看到上面的嵌入代碼片段,看看有沒有CSS規則被繼承。我在Mac上使用Safari。 – JROB