gpt4 book ai didi

html - Textarea 占位符不带属性

转载 作者:太空宇宙 更新时间:2023-11-04 09:38:10 25 4
gpt4 key购买 nike

我的问题是 textarea 占位符没有采用 css 属性

我有 HTML:

<textarea id="information" class="career-form-textbox" name="message" placeholder="Add a cover letter or anything else you want to
share.">
</textarea>

我有 CSS:

input,
textarea::-webkit-input-placeholder {
color: #848484;
font-size: 18px;
font-weight: 400;
opacity: 0.2;
font-family: Open Sans;
}

input,
textarea:-moz-placeholder,
color #848484 {
font-size: 18px;
font-weight: 400;
opacity: 0.2;
font-family: Open Sans;
}

input,
textarea::-moz-placeholder,
color #848484 {
font-size: 18px;
font-weight: 400;
opacity: 0.2;
font-family: Open Sans;
}

input,
textarea:-ms-input-placeholder,
color #848484 {
font-size: 18px;
font-weight: 400;
opacity: 0.2;
font-family: Open Sans;
}

但它不起作用,提前致谢,抱歉格式错误浏览器:Chrome

最佳答案

您发布的 CSS 代码中似乎存在一些语义错误。试试这个:

input,
textarea::-webkit-input-placeholder { /* WebKit browsers */
color: #848484;
}
input,
textarea:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #848484;
opacity: 1;
}
input,
textarea::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #848484;
opacity: 1;
}
input,
textarea:-ms-input-placeholder { /* Internet Explorer 10+ */
color: #848484;
}
<textarea id="information" class="career-form-textbox" name="message"
placeholder="Add a cover letter or anything else you want to
share."></textarea>

关于html - Textarea 占位符不带属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40147031/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com