Develop as a web front-end
To make html semantic
You often need to add titles to the content module to make the page more meaningful.
Of course, there are our image buttons.
The page information can be smoothly obtained without leaving css streaking.
Generally, to deliver better visual effects
We often use images to replace fonts.
Earlier front-end development often did not provide content directly in html.
Use & nbsp; (or even empty)
In this way, you cannot know what the block is when it is not loaded to css.
Start
Which of the following methods is usually used to offset the font?
(1)
Use text-indent:-9999px;
However, he has a limitation that he only applies to block-level element blocks.
And sometimes we want to offset the font on.
So the question comes.
Text-indent:-9999px; although easy to use
If a is converted into a block, the elements behind him will be pushed to the next line.
If a is followed by a button
Float will be used to float to bring people behind him
Is it a little troublesome?
(2)
Line-height: 0;
Font-size: 0;
Overflow: hidden;
Can "hide" the font above your background perfectly
Ie6.0, 7.0, 8.0, and firefox 3.010 passed the test.
(3)
The most convenient thing is to add a span and then display: none, without any bugs.
Unfortunately, when multiple tags are added and used in a loop, a bunch of bytes are added to html. We recommend that you use a single button.
However, it is difficult to hide the input value.
So we can only use block and text-indent to "offset" to simulate hiding.
Display: block;
Font-size: 0;
Line-height: 0;
Text-indent:-9999px;
Ie6.0, 7.0, and firefox 3.010 passed the test.