Solution to the problem that the background image of a label does not display in IE8

Solution to the problem that the background image of a label does not display in IE8
I encountered a small problem today and struggled for a long time. Let me share it with you.

To add a background image to the a tag, you need to add the display:block style to a.

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

Before modification:

Copy code
The code is as follows:

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


After modification:

Copy code
The code is as follows:

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

Did you notice that? It’s because of that space. .

<<:  9 Tips for MySQL Database Optimization

>>:  A small piece of HTML code will include the Baidu search bar in your page

Recommend

CSS sets the list style and creates the navigation menu implementation code

1. Set the list symbol list-style-type: attribute...

Six inheritance methods in JS and their advantages and disadvantages

Table of contents Preface Prototype chain inherit...

HTML Grammar Encyclopedia_HTML Language Grammar Encyclopedia (Must Read)

Volume Label, Property Name, Description 002 <...

Specific implementation methods of MySQL table sharding and partitioning

Vertical table Vertical table splitting means spl...

JavaScript message box example

Three types of message boxes can be created in Ja...

The difference between distinct and group by in MySQL

Simply put, distinct is used to remove duplicates...

Sharing some details about MySQL indexes

A few days ago, a colleague asked me a question a...

Nodejs plug-in and usage summary

The operating environment of this tutorial: Windo...

Instructions for using MySQL isolation Read View

Which historical version can the current transact...

25 Examples of News-Style Website Design

bmi Voyager Pitchfork Ulster Grocer Chow True/Sla...

How to generate Hive table creation statement comment script in MySQL metadata

Preface This article mainly introduces the releva...

Ant designing vue table to achieve a complete example of scalable columns

Perfect solution to the scalable column problem o...