Make a friendly Link

Source: Internet
Author: User

Make a friendly Link

Two main points: a. Give an image prompt based on the specific link; B. Move the mouse over the link and a specific content prompt appears;

1. Add images to links

The attribute selector E [attr $ = "value"] of css is used to indicate the element E that owns the attribute attr and ends with the attribute value. Example:

a[href$=".zip"]        {            background-image:url("img/zip1.png");        }

Indicates the element whose href value ends with ". zip". For example, the following a element meets the requirements.

<A href = "http://www.aabbcc.zip"> download compressed files </a>

In this case, we can match various links ending with .hangzhou.png).xlsx. In fact, if you have few links, you can directly control them by class name.

2. Move the mouse over the connection and a prompt is displayed.

Mainly used: hover selector. First, hide the prompt box. When you move the mouse over the connection, the prompt box is displayed.

span{        visibility: hidden;        }a[href$=".zip"]:hover .tips{visibility: visible;        }

The drawing of the pop-up tips box is shown in the http://blog.csdn.net/u010037043/article/details/45642267

Demo Stamp: http://runjs.cn/detail/bjnel1xx


Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.