There are text and pictures in the a tag. How to hide the text and only show the picture?

There are text and pictures in the a tag. How to hide the text and only show the picture?

Often you will encounter a style of <a> tag that displays an image, but there is text in the tag and you want to hide the text. In many cases, you will think of

text-indent:-9999em;

But today I found that the pictures are not displayed in IE7 and 360 default IE mode, so I checked it online and summarized it below:

The css writing method in ie7 mode is as follows:

Copy code
The code is as follows:

text-indent: -9999em;
overflow: hidden;
float: left; //Of course you can also float: right;

The above css can already solve this problem.

360 has an IE mode and a speed mode. If you want to open a web page in the default speed mode, just add the following sentence in <head>:

Copy code
The code is as follows:

<meta name="renderer" content="webkit"> Speed ​​mode
<meta name="renderer" content="ie-comp"> Compatibility mode
<meta name="renderer" content="ie-stand"> IE mode

<<:  Vue implements simple notepad function

>>:  How to adapt CSS to iPhone full screen

Recommend

HTML table markup tutorial (10): cell padding attribute CELLPADDING

Cell padding is the distance between the cell con...

Vue implements start time and end time range query

This article shares with you how to query the sta...

jQuery realizes the sliding effect of drop-down menu

When we make a web page, sometimes we want to hav...

Explanation of the working principle and usage of redux

Table of contents 1. What is redux? 2. The princi...

An audio-visual Linux distribution that appeals to audiophiles

I recently stumbled upon the Audiovisual Linux Pr...

MySql quick insert tens of millions of large data examples

In the field of data analysis, database is our go...

Detailed explanation of the difference between Vue life cycle

Life cycle classification Each component of vue i...

A brief discussion on two current limiting methods in Nginx

The load is generally estimated during system des...

Use of Linux ifconfig command

1. Command Introduction The ifconfig (configure a...

MySQL data type details

Table of contents 1. Numeric Type 1.1 Classificat...

Use of hasOwnProperty method of js attribute object

Object's hasOwnProperty() method returns a Bo...