


Several methods and ideas for exchanging pictures for words_Experience exchange
Today, a friend encountered a problem when making a web page: he wanted to keep the background of the link, but also wanted the text in the link to disappear! But after working on it for a long time, I still couldn't get rid of this text. I think many friends who study standards have encountered this problem. Here I will write down several commonly used methods and explain the ideas, hoping to help friends who are just starting to learn.
"Replace pictures with words" means replacing text expressions with pictures. We all know that the representation of text in browsers is very poor. It is jagged, cannot be rounded, and cannot have many effects. Under normal circumstances, the content part of a web page does not need to be effected, but in WEB standards, these are often needed for logos and titles. If we use a table to do it, we just post a picture somewhere. This method is relatively simple, but it is not conducive to search. So we need to do it in a standard way to ensure that the web page is in a good state and is conducive to search. Usually displayed as shown in the figure
: (display:none;) This does not just make the contents of the container disappear but also the container itself. Therefore, we must make another container within the container to ensure that the background in the container can be displayed normally after the inner part disappears. Example:
If it is written like this, you will not see anything at all. So what is the correct way to write it? Look at the example:
Can you guess what this code can display? The fact is that the background is displayed, but the link is gone. As we said above: the container itself that is assigned the display:none; attribute will also disappear. Then we know clearly that we must add a container to this A tag. Let’s look at the example again:
Note that the attribute of the A tag here must be added with display:block; to force it to be a block-level element. In this way, the A tag becomes a link form with a width of 300 and a height of 100, with a background and no text content. Everyone saw that a span tag was added to the A tag above, which seems a bit redundant. Can the effect be achieved without span? Yes, but the idea is different, it is the following position shifting method.
Position movement: that is, the content is moved out of the display area. Let’s look at the code to understand this method.
The above are just two of my more commonly used methods. Of course, there are other methods, each of which has its own shortcomings, but the various methods are also complementary to each other. You can choose to use it according to the situation when applying.

Here's a container with some child elements:

Flyout menus! The second you need to implement a menu that uses a hover event to display more menu items, you're in tricky territory. For one, they should

"The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect."- Tim Berners-Lee

In this week's roundup: datepickers are giving keyboard users headaches, a new web component compiler that helps fight FOUC, we finally get our hands on styling list item markers, and four steps to getting webmentions on your site.

The short answer: flex-shrink and flex-basis are probably what you’re lookin’ for.

In this week's look around the world of web platform news, Google Search Console makes it easier to view crawled markup, we learn that custom properties

The IndieWeb is a thing! They've got a conference coming up and everything. The New Yorker is even writing about it:


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver Mac version
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

Zend Studio 13.0.1
Powerful PHP integrated development environment