我想將背景圖像設置爲背景併爲背景顏色添加背景顏色。但我無法通過背景顏色獲取背景圖像。此外,我想通過span#test
背景圖像任何幫助將不勝感激。無法在背景顏色前帶背景圖像
<div id="container">
<div id="Content">
Hello world, this is my content, Hello world, this is my content <br />
Hello world, this is my content, Hello world, this is my content <br />
Hello world, this is my content, Hello world, this is my content <br />
Hello world, this is my content, Hello world, this is my content <br />
</div>
<span id="test">
Test
</span>
</div
#container
{
position: relative;
margin-bottom: -20px;
background-image: url('https://www.google.co.uk/images/srpr/logo11w.png');
background-size: contain;
background-repeat: no-repeat;
height: 50px;
width: 100px;
z-index: 10001;
}
#Content
{
background-color:#C9CACA;
}
這裏是
感謝您reply.Can爲同你請建議份額的jsfiddle。 –