How using usemap in div background url

后端 未结 3 1172
清酒与你
清酒与你 2021-01-17 16:03

i missed you can you help me? i have such style

.lorry{
    background: url(../img/lorry.png);background-repeat:no-repeat;
    _background: none;
    _filter         


        
3条回答
  •  被撕碎了的回忆
    2021-01-17 16:26

    I just come up here because I was trying do the same, and I found one one to use "map" without image.

    As the other folks said, isn't possible use maps without image, but we can use DIV instead.

    What you do is, you place a div over the main image and create a link for that DIV, below follows my code:

    HTML

    
    

    CSS

    #progress {
        width: 257px;
        height: 84px;
        background:url(http://upload.wikimedia.org/wikipedia/en/9/95/Stack_Overflow_website_logo.png);
        position:relative;
    }
    a#link1, a#link2, a#link3 {
        display: block;
        overflow: hidden;
        position: absolute;   
        background: transparent;
        text-indent: -9999px; 
    }
    #link1 {
        left: 10px;
        width: 45px;
        height: 84px;
    
    }
    #link2 {
        left: 55px;
        top: 45px;
        width: 70px;
        height: 39px;    
    }
    #link3 {
        top: 45px;
        left: 124px;
        width: 130px;
        height: 39px;    
    }
    

    jsFiddle of my example.

    Reference: CSS image maps

提交回复
热议问题