Picture as background and link writing method (background picture plus link)_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:37:56
Original
1746 people have browsed it

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

http://www.jb51.net">Tudou

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 words Tudou.com will not be displayed. The title attribute is the text that will be displayed when the mouse is pointed.
link background image is not fully displayed under normal circumstances, because the link is an inline element, and the width height attribute in the a tag css is invalid.

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

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