The background image of tag a is displayed in ie8. The background image of tag a is ie8.
I encountered a small problem today and had a long struggle.
To add a background image to tag a, add the display: block style to tag.
However, in ie8, the background image still cannot be displayed. I thought it was caused by the empty tag a. I tried to add the content, but I noticed some details. After the modification, the image will be displayed normally.
Before modification:
Background: url ('./img/active/legendBg.png') no-repeat
After modification:
Background: url ('./img/active/legendBg.png') no-repeat
Do you notice that it is because of the space ..
The ie8 background is not displayed. Please (* ^__ ^ *)
Background: url (images/ylk_16.gif) top center no-repeat; changed to background: url (images/ylk_16.gif) top center no-repeat; top and image path are separated; better apply the display: inline-block. Why should I study it?
The background image defined by CSS is normal in IE6, and is not compatible in IE8.
"Internet Explorer 6 !!! "
Let me complain before each sentence.
The background requirement you want to define is not repeated. no-repeat must be included. The center display is unnecessary.
Generally, scroll is used for Web pages. For example, 200px 100px is px from the left, and 100px is above.
So you can write it like this.
. Munebg3 {
Background: url (../img/munebg3.jpg) no-repeat scroll center}
If the center cannot be tuned, use the specific pixel, because sometimes your background is not the same even if it is centered.
Set the background image to center
It's not difficult to make a good decision with firebug.