【发布时间】:2017-01-24 09:49:28
【问题描述】:
我为这样的组件设置了一个 scss 文件:
#footer {
background-color: white;
z-index: 100;
display: flex;
position: absolute;
left: 0;
bottom: 0;
height: 100px;
width: 100%;
.image-one {
width: 50;
height: 50;
}
}
在我的组件中:
render(){
return(
<footer id="footer">
<img
className="image-one"
src="/files/img/imageOne.png"
/>
</footer>
)
}
scss 正确引用了页脚,但 className="image-one" 未正确引用。图像一没有变化。我做得对吗?
谢谢
编辑
填充前:
填充后 - 出现滚动条:
【问题讨论】:
-
如果你从
#footer { ... }中取出.image-one会发生什么?它是否正确应用了 css?
标签: javascript html css reactjs sass