我在将每个设备上的标题图像变为全宽时遇到了问题。我通过将背景大小更改为100%来解决此问题。现在图像的顶部和底部都有黑条,将内容与图像分开。解决这个问题的最好方法是什么?在引导程序中获取响应式全宽图像
这里是我的CSS:
//Color Pallette
$backgroundWhite: #d1d1d1
$spectrumRed: #a10019
$darkestGrey: #2f2f2f
$darkGrey: #252525
$grey: #6e6e6e
//Fonts
$raleway: 'Raleway', sans-serif
html,body
overflow-x: hidden
height: 100%
margin: 0
padding: 0
li
font-family: $raleway
.container-fluid
background-color: #333
border-bottom: 4px solid $spectrumRed
#navbarItem:hover
color: $backgroundWhite
#active
background-color: $spectrumRed
color: $backgroundWhite
.wide (THIS IS THE IMAGE CONTAINER DIV)
margin-top: -60px
background: #000 url("/img/9114.jpg") center center
background-size: 100%
background-repeat: no-repeat
width: 100%
height: 80%
display: inline-block
#modelName
background-color: $darkGrey
color: $backgroundWhite
width: 100%
margin-top: -35px
display: inline-block
border-bottom: 10px solid $spectrumRed
#modelName h1
font-family: $raleway
font-weight: 600
'background-size:cover'? – BenM