How to write a picture as a background and a link (background picture plus link)

How to write a picture as a background and a link (background picture plus link)

The picture is used as the background and the link is written. For example, the logo image of the website. For example: Potato logo image

<a title="Tudou.com Everyone is the director of life" href="https://www.jb51.net">Tudou.com</a>

a {display: block;width: 170px;height: 42px;text-indent: -9999px;background: url(/skin/__g/img/ui/nav/v2_v6.png) 0 0 no-repeat;}
Due to z-indent, the three words "Tudou.com" will not be displayed. The title attribute is the text that will be displayed when the mouse is pointing at it.
The background image of the <a><span> link is not fully displayed under normal circumstances, because the <a> link is an inline element and the width and height attributes in the a tag CSS are invalid.

The improvement method is to use display:block; or display:inline-block; in CSS and then set the width and height.

<<:  Detailed steps for installing nodejs environment and path configuration in Linux

>>:  Some issues we should pay attention to when designing a web page

Blog    

Recommend

Detailed explanation of creating and calling MySQL stored procedures

Table of contents Preface Stored Procedure: 1. Cr...

Summary of the understanding of virtual DOM in Vue

It is essentially a common js object used to desc...

How to Monitor Linux Memory Usage Using Bash Script

Preface There are many open source monitoring too...

Detailed explanation of nginx shared memory mechanism

Nginx's shared memory is one of the main reas...

Implementation code for adding slash to Vue element header

<template> <div class="app-containe...

Implementation of CSS circular hollowing (coupon background image)

This article mainly introduces CSS circular hollo...

Markup language - simplified tags

Click here to return to the 123WORDPRESS.COM HTML ...

Detailed explanation of EXT series file system formats in Linux

Linux File System Common hard disks are shown in ...

Based on JavaScript ES new features let and const keywords

Table of contents 1. let keyword 1.1 Basic Usage ...

Common date comparison and calculation functions in MySQL

Implementation of time comparison in MySql unix_t...