【发布时间】:2018-03-21 01:33:03
【问题描述】:
在上面设置灰色容器的照片中,我想添加一个高对比度的黑白照片滤镜。
我尝试缩放不透明度并使用过滤器 css3 属性,但没有成功。 主体是背景图像,子容器是灰色框。我只想让孩子展示黑白。
body{
background: url('../images/wtc.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.profile-box{
background-color: grey;
width: 80%;
height: 60%;
margin-top: 180px;
margin-bottom: 100px;
}
【问题讨论】:
-
你的形象是预期的结果,还是你得到和不喜欢的结果?
-
您必须为灰色框提供相同的背景图像并将其放大以确保它与背景匹配。然后您可以将CSS grayscale 应用于弹出图像。