Home > Web Front-end > HTML Tutorial > The ultimate solution for hiding button text_html/css_WEB-ITnose

The ultimate solution for hiding button text_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:34:47
Original
1155 people have browsed it

Some of the known methods for hiding button text are not perfect:

Method 1 text-indent negative value method

ie6, 7 clicks on the button itself You will also be abducted - -

Method 2 font:0/0 a Method

ie6, after 7 clicks you will see a thin line on the button

Solution

For advanced browsers, you can use color:transparent to hide the button text

For ie6 and 7, please use the magical padding-left attribute

ie6 , 7 times when setting a larger padding-left attribute value to the button when the button has a given width, you can find that the width of the button itself remains unchanged but the text on the button has been squeezed out

ok call it a day o (∩_∩)o

Enjoy criticism and advice

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template