gpt4 book ai didi

css - 占位符文本仅在 Internet Explorer 中可见

转载 作者:太空宇宙 更新时间:2023-11-04 02:55:52 26 4
gpt4 key购买 nike

我有一个地址表单的占位符,用于向访问者举例说明如何格式化他们的地址。占位符文本在 IE 中可见,但在其他浏览器(chrome、firefox、safari)中它是透明的。

如何修复它以便在所有浏览器中显示?

 .form-control {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.form-control:focus {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
}
.form-control::-moz-placeholder {
color: #999;
opacity: 1;
}
.form-control:-ms-input-placeholder {
color: #999;
}
.form-control::-webkit-input-placeholder {
color: #999;
}
}
.form-control:-moz-placeholder {
color: #c0392b;
}
}
.form-control::-moz-placeholder {
color: #c0392b;
}
<div class="form-group">
<label>Recipients Address</label>
<textarea class="form-control" id="message" name="message" placeholder="Enter the address in the same format as you would write it on a envelope.

EXAMPLE:
Thomas Nolan Kaszas II
5322 Otter Lane
Middleberge FL 32068" rows="8"></textarea>
</div>

enter image description here

最佳答案

显然你有半透明的文本区域,它与默认的灰色占位符颜色相结合,使文本完全不可读。您可以使用以下规则集更改占位符的文本颜色

::-webkit-input-placeholder {color:#c0392b;}
::-moz-placeholder {color:#c0392b;}/* Firefox 19+ */
:-moz-placeholder {color:#c0392b;}/* Firefox 18- */
:-ms-input-placeholder {color:#c0392b;}

关于css - 占位符文本仅在 Internet Explorer 中可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32211638/

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