Make A List Item Clickable (HTML/CSS)

后端 未结 8 2003
北恋
北恋 2020-12-03 05:26

So I\'m trying to make each list-item on my site clickable but I\'m not sure what is the best way to do it. Please help me out.

So here is the relevant HTML:

8条回答
  •  失恋的感觉
    2020-12-03 06:03

    I think you could use the following HTML and CSS combo instead:

  • Backback
  • Then use CSS background for the basket visibility on hover:

    .listblock ul li a {
        padding: 5px 30px 5px 10px;
        display: block;
    }
    
    .listblock ul li a:hover {
        background: transparent url('../img/basket.png') no-repeat 3px 170px;
    }
    

    Simples!

提交回复
热议问题