css - 如何改变一个窗体的背景,使它看起来像两个窗体?

标签 css drupal drupal-7

下面是我要实现的目标: enter image description here

这是我目前所拥有的: enter image description here 我正在使用 Drupal 7。这是测试站点的链接:http://test-caal.gotpantheon.com/

这是一种形式,我想让它看起来像两种形式。有没有办法添加背景图像,使其看起来与我试图实现的目标相同?

感谢您的帮助!

和泉。

最佳答案

jsBin demo

enter image description here

表单允许您使用 <fieldset></fieldset>标签。

类似的东西

<form id="" action="" method="">    
    <fieldset>
        <!-- inputs here -->
    </fieldset>
    <fieldset>
        <!-- inputs here -->
    </fieldset>    
</form>

并相应地设置样式,可能正是您要找的。查看上面的演示链接。

 <form id="" action="" method="">

    <fieldset>
      <h3>Member Login</h3>
      <input type="text" placeholder="Username">
      <input type="text" placeholder="Password">
    </fieldset>
    <fieldset>
      <h3>Partner Login</h3>
       <input type="text" placeholder="Username">
       <input type="text" placeholder="Password">
    </fieldset>   

</form>

基本 CSS:

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;
}

关于css - 如何改变一个窗体的背景,使它看起来像两个窗体?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20390051/

相关文章:

html - 如何让应用程序出现在悬停在图像顶部时?

authentication - 在 Drupal 中注册后重定向

php - Eclipse 语法突出显示 : trying to specify it for a new file extension, 并且它不起作用

html - 如何在网站中使用自定义字体

git - Drupal Sandbox git 存储库这么大? ( 打包文件大小 : 21MB)

CSS:如何相对于具有背景大小的图像定位元素:封面?

html - 为什么这个样式是从一个祖先(而不是父级!)div 继承来的?

CSS 缩放大小和表格单元格内容

java - Java 中的 Drupal 风格 base64 编码

drupal - 在drupal中获取当前页面 View