Making the clickable area of in-line links bigger without affecting the layout

前端 未结 5 799
滥情空心
滥情空心 2021-02-05 16:49

I\'m looking to make the clickable area of links bigger than they actually are for accessibility since for the intended users it can be difficult to hit them. About 1.5x the siz

5条回答
  •  滥情空心
    2021-02-05 17:19

    You can do it using a bigger padding.

    For example:

    .a{
        padding: 20px;
        margin: -20px; //lets keep the layout
    }
    

    Here you have a living example: http://jsfiddle.net/u5kuJ/1/

    Updated:

    With your fiddle: http://jsfiddle.net/XXgqu/1/

提交回复
热议问题