将我的输入框设置为半透明 [英] Set my input boxes semi-transparent

查看:1002
本文介绍了将我的输入框设置为半透明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法找到将我的输入框呈现为半透明的方法。我在后台有一张图片。我的意思是,只有我的输入框的背景必须是半透明的,而不是文本。



有什么想法?

这是我的html代码示例

 < h2> Connexion< / h2> 
< div>
< label for =UserName>用户名< / label>
< / div>
< div>
< label for =密码>密码< / label>
< input data-val =truedata-val-required =Le mot de passe est requisid =Passwordname =Passwordtype =password/>
< / div>


解决方案

如果你的意思是说你有一个背景图片希望能够查看输入框,然后在设置 background-color 时可以使用 rgba() 输入

 输入{
背景色:rgba(255,255,255,0.5);
}


I couldn't find a way to render my input boxes semi-transparent. I have an image in the background. I mean only the background of my input boxes must be semi-transparent, not the text.

Any idea?

Here is an example of my html code

<h2>Connexion</h2>
<div>
    <label for="UserName">Username</label>               
    <input data-val="true" data-val-required="Le nom d&amp;#39;utilisateur est requis" id="UserName" name="UserName" type="text" value="" />                             
</div>
<div>
    <label for="Password">Password</label>
    <input data-val="true" data-val-required="Le mot de passe est requis" id="Password" name="Password" type="password" />              
</div> 

解决方案

If you mean that there is a background image that you want to be able to see through your input boxes then you can just user rgba() when setting the background-color of an input:

input {
    background-color: rgba(255, 255, 255, 0.5);
}

这篇关于将我的输入框设置为半透明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆