How to increase the clickable area of a tag button?

前端 未结 11 1443
悲哀的现实
悲哀的现实 2021-01-29 22:04

I have learnt from this post that always use tags or

11条回答
  •  太阳男子
    2021-01-29 22:32

    Yes you can if you are using HTML5, this code is valid not otherwise:

    .......

    If you are not using HTML5, you can make your link block:

    Click Here
    

    CSS:

    #link {
      display : block;
      width:100px;
      height:40px;
    }
    

    Notice that you can apply width, height only after making your link block level element.

提交回复
热议问题