如何设置html表单里text文本框是透明的

如题所述

input标签原来是带有白色的背景,如果要实现背景透明可以用css来控制背景:
1,把背景改成透明的
<input type="text" style="border:0px;background:rgba(0, 0, 0, 0); ">

2,直接隐藏背景

<input type="text" style="border:0px;background:none;">
温馨提示:答案为网友推荐,仅供参考
第1个回答  2020-03-17

任意标签:比如<input>


<!DOCTYPE html>

<html>

<head>

    <title>透明文本框</title>

    <style type="text/css">

        input {

            filter: alpha(Opacity=80);

            -moz-opacity: 0.5;

            opacity: 0.5;

        }

    </style>

</head>

<body>

    <input value='三生三世十里桃花'> </body>

</html>


即可实现透明文本框,filter: alpha(Opacity=80);-moz-opacity: 0.5;opacity: 0.5;

相似回答