友人用のログインページをデザインしていますが、画像上にぼかしたボックスを作成しようとしています。これは私が、私はそれがボックスに並んでいない理由はわからない遠く、ログイン用のぼかしボックスの作成
<html>
<link rel="stylesheet" href="css/homepage.css">
<!-- Page starts here -->
<body id="bg">
<div class="center">
<div id="image" class="image center">
<img>
</div>
</div>
</body>
</html>
とCSS
#bg {
height: 100vh;
width: 100%;
background: url(http://www.funchap.com/wp-content/uploads/2014/02/amazing-horse-pictures.jpg) center no-repeat;
background-size: cover;
z-index: -2;
margin: 0;
}
.image {
background-size: cover;
height: 62%;
width: 22.5%;
-webkit-filter: blur(10px);
-moz-filter: blur(10px);
-o-filter: blur(10px);
-ms-filter: blur(10px);
filter: blur(10px);
overflow: hidden;
border-style: hidden;
border-radius: 25px;
border-color: transparent;
}
.image img {
background: url(http://www.funchap.com/wp-content/uploads/2014/02/amazing-horse-pictures.jpg) center;
background-size: cover;
overflow: hidden;
height: 300%;
width: 300%;
}
.center {
position: absolute;
margin: auto;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
#logo {
z-index: 0;
width: 13%;
margin: auto;
top: 0;
bottom: 0;
left: 0;
right: 0;
position: absolute;
padding-bottom: 15%;
}
に持っているものです。どんな助けも歓迎です。
P.S.あなたが疑問に思うなら、馬の画像は2560 x 1600です。
ありがとうございます。
これは何をするのか:** – Mojtaba
は '.image img'のためにあなたのコードを見て提案する - あなたは空の' img'タグに背景のプロパティを設定することはできませんし、それが動作することを期待してください。イメージURLをimgタグの 'src'属性に入れるか、背景を持つブロック要素を使用してください。 – chazsolo