The background image of tag a is displayed in ie8. The background image of tag a is ie8.

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.