我有以下CSS,我想在背景图像的下部显示表单面板。使用CSS的响应式网站 - 在背景图像上添加面板
背景图像CSS部分:
.ban {
background: transparent url('../../im.jpg') 0 0 no-repeat fixed;
text-align: center;
background-size: cover;
height: 600px;
width: 100%;
margin-bottom: 3em;
display: table;
}
形式面板CSS部分:
.signPanel{
display: table-cell;
font-size: 1em;
margin-top: 0.125em;
color: white;
font-weight: 50;
text-shadow: 0 1px 1px black;
}
HTML部分 图像来这里
</div>
<form class="signPanel">
<fieldset>
<legend>Login</legend>
<input type="email" placeholder="Email"> <input
type="password" placeholder="Password"> <label
for="remember">
</label>
<button type="submit" class="pure-button pure-button">Sign
in</button>
</fieldset>
</form>
下面的图片会描述一下我想要实现。
请加小提琴.. –
在这里你去...我为你创造了一个小提琴。如果你想移动div,我建议你使用position:relative和css顶部。 http://jsfiddle.net/5AzAa/2/...就像@SamiraKhorshidi说的那样,下次请添加小提琴。 – Minelava
@Minelava出于某种原因,您的解决方案无法正常工作。面板显示在黑色区域。 –