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

What are your principles for designing indexes? How to avoid index failure?

Table of contents Primary key index Create indexe...

Sharing the structure and expression principles of simple web page layout

Introduction to structure and performance HTML st...

Solution to mysql error code 1064

If the words in the sql statement conflict with t...

Writing methods that should be prohibited in native JS

Table of contents Block-level functions Directly ...

This article will show you the principle of MySQL master-slave synchronization

Table of contents Brief Analysis of MySQL Master-...

JavaScript implements the protocol example in which the user must check the box

In js, set the user to read a certain agreement b...

Dynamically add tables in HTML_PowerNode Java Academy

Without further ado, I will post the code for you...

Case study of dynamic data binding of this.$set in Vue

I feel that the explanation of this.$set on the I...

Example analysis of MySQL startup and connection methods

Table of contents How to start mysqld Method 1: m...

Detailed tutorial on how to install mysql8.0 using Linux yum command

1. Do a good job of cleaning before installation ...

CentOS 7 cannot access the Internet after modifying the network card

Ping www.baidu.com unknown domain name Modify the...

In-depth analysis of MySQL index data structure

Table of contents Overview Index data structure B...

Win7 installation MySQL 5.6 tutorial diagram

Table of contents 1. Download 2. Installation 3. ...

Briefly describe the use and description of MySQL primary key and foreign key

Table of contents 1. Foreign key constraints What...