I read the CSS binding creation guide and never get a true idea. However, today I am learning the lesson as follows:
.#city-images-div {
background: url(../img/100.jpg) no-repeat fixed 0px 0px;
position: absolute;
top: 2px;
left: 2px;
width: 557px;
height: 374px;
cursor: pointer;
border: none;
}
<div id="city-images-div"></div>
The code above will not help me display the background image 100.jpg.
If I changed the background binding from fix to scroll, then the image may be displayed. Image size is 557x374.
I don’t know why the background plays here here.
Q1> What is the practical use of background attachment
Q2> Why the image is not displayed if the value is fixed and displayed correctly if the value scrolls.
Thank you
this is a typo and fix should be fixed.
q0987 source
share