我有一个包含此代码的表单:
<form class="form-inline">
<div class="form-group col-xs-2 col-md-2">
<label for="name" class="control-label">Mail</label>
<input type="email" value='' id="name" placeholder="Email">
</div>
<div class="form-group col-xs-2 col-md-2">
<label for="name" class="control-label">Pass</label>
<input type="password" value='' id="name" placeholder="Password">
</div>
<div class="form-group col-xs-2 col-md-2">
<label for="name" class="control-label"></label>
<button type="submit" class="btn btn-default">Log In</button>
</div>
</form>
看起来像这样:
但我想用不透明/透明的书写颜色包围它(说还有一个 bakground 图像)。为了让您更好地了解我需要什么,这里有一个示例:
谢谢。
最佳答案
如下使用 RGBA 背景颜色
#form_container {
background-color: rgba(255, 255, 255, 0.3);
}
并将背景图像应用于父级,例如:
body {
background-image: url('NiceBackground.png');
}
关于css - 如何用不透明背景包围表格?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43634594/