Css 如何更改窗体的背景以使其看起来像两个窗体?
以下是我努力实现的目标: 这就是我到目前为止所做的: 我正在使用Drupal7。这是指向测试站点的链接: 这是一种形式,我想让它看起来像两种。有没有一种方法可以添加一个背景图像,使它看起来和我试图实现的一样 谢谢你的帮助 小泉。 表单允许您使用Css 如何更改窗体的背景以使其看起来像两个窗体?,css,drupal,drupal-7,Css,Drupal,Drupal 7,以下是我努力实现的目标: 这就是我到目前为止所做的: 我正在使用Drupal7。这是指向测试站点的链接: 这是一种形式,我想让它看起来像两种。有没有一种方法可以添加一个背景图像,使它看起来和我试图实现的一样 谢谢你的帮助 小泉。 表单允许您使用标记 大概是 <form id="" action="" method=""> <fieldset> <!-- inputs here --> </fieldset>
标记
大概是
<form id="" action="" method="">
<fieldset>
<!-- inputs here -->
</fieldset>
<fieldset>
<!-- inputs here -->
</fieldset>
</form>
对于您试图实现的目标,两种不同的表单是最佳选择,因为您有两个不同的
登录按钮。这样做:
<div id="forms">
<form id="form1">
/*Form stuff goes here*/
</form>
<form id="form2">
/*Other form goes here*/
</form>
</div>
嗯。。。考虑到您有两个“登录”按钮,并且它们是互斥的(一个人只填写一面,而不是两边),那么它们实际上不应该是两个独立的
s吗?
form h3{
color:#fff;
font-family:Helvetica, Arial, sans-serif;
font-size:1.4em;
padding:10px 0;
border-top:2px solid #fff;
border-bottom:1px solid #fff;
}
fieldset{
background:#589FCF;
border: 5px solid #2E2E2E;
width:180px;
display:block;
float:left;
margin:0;
}
form input[type=text]{
border:0;
padding:10px;
margin-bottom:2px;
}
<div id="forms">
<form id="form1">
/*Form stuff goes here*/
</form>
<form id="form2">
/*Other form goes here*/
</form>
</div>
#forms{
background-color:black;
}
#form1 #form2{
background-color:rgb(69,136,203);
}