我有一个页面有一个背景封面图片,我的输入框只有边框底部,问题是输入字段现在显示白色作为背景看起来不太好,我想让它们透明采取那个封面背景,怎么做请帮忙?
这是我的代码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
答案 0 :(得分:0)
只需在.m-item {}类
中添加以下css即可.m-item { background: transparent none repeat scroll 0 0; }