how to attach url link to an image?

前端 未结 2 508
春和景丽
春和景丽 2020-12-15 05:43

I am creating an website. It contains videos of different places. Now my problem is i need integrate an image on that with url link. when user taps on that link it has to go

相关标签:
2条回答
  • 2020-12-15 06:25

    Alternatively,

    <style type="text/css">
    #example {
        display: block;
        width: 30px;
        height: 10px;
        background: url(../images/example.png) no-repeat;
        text-indent: -9999px;
    }
    </style>
    
    <a href="http://www.example.com" id="example">See an example!</a>
    

    More wordy, but it may benefit SEO, and it will look like nice simple text with CSS disabled.

    0 讨论(0)
  • 2020-12-15 06:47

    "How to attach url link to an image?"

    You do it like this:

    <a href="http://www.google.com"><img src="http://www.google.com/intl/en_ALL/images/logo.gif"/></a>
    

    See it in action.

    0 讨论(0)
提交回复
热议问题