gpt4 book ai didi

html - 如何在输入框内显示封面图像使输入字段透明?

转载 作者:行者123 更新时间:2023-11-28 06:19:29 26 4
gpt4 key购买 nike

我有一个页面有一个背景封面图片,我的输入框只有底部边框,问题是输入字段现在显示白色作为背景,这看起来不太好,我想让它们透明并采用那个封面背景,请帮忙怎么做?

这是我的代码 login.html 文件:

<html>

<head>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>

<body class="body">

<form name="form" ng-submit="login()" role="form">
<div class="list-inset">
<div class="login-div-outer">
<input type="text" name="username" id="username" placeholder="USERNAME" ng-model="data.username" class=" m-item" required>
</div>

<div class="login-div-outer">
<input type="password" name="password" id="password" placeholder="PASSWORD" ng-model="data.password" class=" m-item" required >
</div>

</div>
</form>

<button class="button button-full m-login-btn" type="submit" ng-disabled="form.$invalid" ng-click="login()" eat-click-if="!checkNetwork(true)">
login
</button>

</body>

</html>



css that i have tried :

.body{
background-image: url('https://images.blogthings.com/thecolorfulpatterntest/pattern-1.png');
background-size: cover;

}

.m-item{
width: 93%;
border: none !important;
border-bottom: 1px solid grey !important;
/* background-color: rgba(0, 0, 0, 0); */
outline: none!important;
margin-left: 10px;
margin-right: 10px;
margin-bottom: 25px;
/* background: transparent; */
font-size: 16px !important;
}

例如,我添加了一个 plunker 链接:

        https://plnkr.co/edit/auDZZJrqx6b6iv4MvU1p?p=preview

what i want to do is input should also show the background image so that when the background image is light in color white color should not get shown as it does'nt looks good

最佳答案

只需在 .m-item { } 类中添加以下 css

.m-item { background: transparent none repeat scroll 0 0; }

关于html - 如何在输入框内显示封面图像使输入字段透明?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35693191/

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