How to solve the problem that the background image of the a tag is not displayed in IE8

php中世界最好的语言
Release: 2018-01-26 10:47:32
Original
2296 people have browsed it

This time I will bring you how to solve the problem that the background image of the a tag does not display under IE8. How to solve the problem that the background image of the a tag does not display under IE8. What are the precautions? What are the following? This is a practical case, let’s take a look at it.

I encountered a small problem the other day. I struggled with it for a long time. I want to share it with
a tag to add a background image. I need to add display:block style to a

but in The background image still cannot be displayed under IE8. At first I thought it was because the a tag was empty. I tried adding content but it didn’t work. Then I noticed a little detail and it can be displayed normally after modification.

Before modification:

background: url('./img/active/legendBg.png')no-repeat
Copy after login

After modification:

background: url('./img/active/legendBg.png') no-repeat
Copy after login

Did you notice, it’s because of that space. .

I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!

Related reading:

How to use the head structure in HTML

Important attributes compatible with IE8X-UA- Compatible

How to use iframe to display weather on your webpage

The above is the detailed content of How to solve the problem that the background image of the a tag is not displayed in IE8. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template