📜  按下 li 时如何打开链接 - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:39.183000             🧑  作者: Mango

代码示例1
li {
      padding: 0px; // The trick is to make a tag acquire all the area of li so
                    // whenever you are hovering in li you are actually hovering
                    // in to the a tag.
   } 
li a {
      margin: 0px;
      display: block;
      width: 100%;
      height: 100%;
      padding: * ; // *add the padding which removed from li here.
      }