我在用

作为我页面中某个部分的背景。理想情况下,我希望白色停留在75%的屏幕上(这将覆盖左边网格中的内容)。
这有可能做到吗?我刚刚尝试了以下CSS:
background: rgba(0, 0, 0, 0) url("../img/page-bg.jpg") repeat-y scroll left center / auto 75%;但却没有这样的运气。
能否实现这一目标。我使用的是Bootstrap 3网格,并有列:
lg-9 (内容)和lg-3 (右侧导航菜单)
干杯
发布于 2017-05-30 10:40:59
你正在申请75%的身高。只需使用75% auto而不是auto 75%
background: #000 url("../img/page-bg.jpg") repeat-y left center;
background-size: 75% auto;
div {
width:300px;
height: 600px;
float: left;
background: #000 url(https://dummyimage.com/300x300/cccccc/ff0000.png&text=Sample-Text) repeat-y left center;
background-size: 75% auto;
}<div>
</div>
https://stackoverflow.com/questions/44259899
复制相似问题