【发布时间】:2020-05-18 00:41:55
【问题描述】:
我正在尝试使用 react 库做一些网站。但是要很好地完成这一点,我不知道如何更改依赖于其他的 CSS 属性。例如,我不希望在我的文本区域 .mirror-container 中使用这个模糊过滤器,背景中使用的是 .home-header
代码如下:
.home-header {
height: 55vh;
width: 100%;
align-items: center;
justify-content: center;
display: flex;
position: absolute;
z-index: -1;
background: url("./assets/images/bg.jpeg") ;
background-position: center center;
background-repeat: no-repeat;
filter: blur(3px);
background-position-y: 80%;
}
.mirror-container {
width: 50rem;
height: 85%;
box-shadow: 0 5px 25px rgba(0,0,0, .5);
color: #000;
margin-top: 8rem;
border-top: 1px solid white;
border-right: 1px solid white; // HERE NEED TO BE WITHOUT BLUR
}
另外我想问一下如何在图片末尾添加一些阴影。我的意思是这样可以平滑地改变背景。或者也许我应该导入一个阴影波 png 并将其插入图像下方?最好的解决方案是什么?
问候。
【问题讨论】:
标签: javascript css reactjs