html - 登录模式框的模糊背景

标签 html css transparency

我正在制作一个应用程序,其中我需要一个背景透明的登录框,以便 <body> 的背景图像也显示。就像在 LinkedIn 中一样:

enter image description here

LinkedIn 的登录框背景模糊。我如何在 CSS 中实现这一目标?

这是我尝试过的方法,但它不起作用。

background-color:ffffff;
opacity:0.4
margin-left:200px;

谁能给我一个好的方向?

最佳答案

您是否尝试过使用过滤器(目前只能在 webkit 中使用)?

检查这个:http://davidwalsh.name/css-filters

(我没有时间尝试,但您可能需要放置两个 div,一个带有图像和滤镜,另一个带有表单)

对不起我的英语:)

编辑:

我做了这支笔:http://codepen.io/anon/pen/gEmrD

HTML:

<div class="container">
  <div class="content">
  </div>
  <div class="form">
    <p>This is you form (with a bit of immagination :P )</p>
  </div>
</div>

CSS:

.container {
  width: 1000px;
  height: 100%;
  min-height: 500px;
  background-image: url('http://www.gordonviaggi.it/files/wedding_packets/in_giro_per_san_francisco.jpeg');
  background-size: 1000px;
  background-position: 50% 50%;
  display: block;
}

.content {
  width: 100%;
  height: 300px;
  margin: 0;
  background-image: url('http://www.gordonviaggi.it/files/wedding_packets/in_giro_per_san_francisco.jpeg');
  background-size: 1000px;
  background-position: 50% 0;
  filter: blur(3px);
  -webkit-filter: blur(3px);
  display: block;
}

.form {
  position: absolute;
  top: 200px;
  left: 250px;
  width: 500px;
  height: auto;
  background-color: rgba(255,255,255,0.5);
  color: #222;
  display: block;
}

关于html - 登录模式框的模糊背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25553273/

相关文章:

javascript - 根据产品数量计算总计

html - Twitter Bootstrap Accordion 全高

html - 另一个 DIV 中的对 Angular 线 DIV

javascript - 从网站打印内容时,如何隐藏显示在文件底部的 URL 地址?

ios - Flutter - iOS 启动屏幕未正确加载

php - 使用 gdlib 复制透明 PNG

java - 如何在 Slick2D 中使我的 Sprite 具有透明背景?

html - 矩形下的 CSS 三 Angular 形

html - 创建我自己的图标字体 .ttf .eot .woff 和 svg 文件

php - 防止类为 'sub-menu' 的 ul 元素成为 Wordpress 菜单中列表项的子元素