gpt4 book ai didi

html - 在输入文本字段中显示背景图像

转载 作者:行者123 更新时间:2023-11-28 10:51:07 25 4
gpt4 key购买 nike

我有一个带背景图片的简单 HTML 页面,现在我要在这个 HTML 页面上应用联系表单。

我想在文本输入字段中显示背景图像,即我想让输入文本字段透明。我已经使用 CSS 代码 background-color:transparent;,但它不起作用。我为输入文本字段设置了白色背景。

最佳答案

试试这个

.contact
{
background: url(https://www.gravatar.com/avatar/ba03773d5fe4b970a7d7fb57a112e932?s=32&d=identicon&r=PG) no-repeat right center;
height:100px;
width:200px;
padding:10px;
}
.contact input[type="text"]
{
background:rgba(0,0,0,0);
border:1px solid #fff;
color:#fff;
}

http://jsfiddle.net/2ZmFA/

关于html - 在输入文本字段中显示背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20490856/

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