简体   繁体   English

如果我无法嵌套锚标签,如何创建带有链接的可点击项目

[英]If I can't nest anchor tags how do I create a a clickable item with a link in it

I'm working on a large list of items. 我正在处理大量项目。 Each item in the list is clickable. 列表中的每个项目都是可单击的。 However, I want a link on each list item. 但是,我想要每个列表项上的链接。 Is there a way to get around nesting anchor tags? 有没有办法解决嵌套锚标签? When I tried to put an anchor tag in another IE didn't like that 当我试图在另一个IE中放置锚标记时,我不喜欢这样

Here's an example: 这是一个例子:

<li>
    <a>
        <a>link to something</a>
   </a>
</li>

There's no need to nest anchor tags, just put them inside your list items. 无需嵌套定位标记,只需将它们放在列表项中即可。

For example: 例如:

<li>
  <a></a>
  <ul>
    <li><a></a></li>
  </ul>
</li>

If that's what you're trying to do. 如果那是您要尝试做的。

好吧,不要浪费时间在整个过程上了,而是像sc davis那样完成列表,并在CSS中添加以下代码> Cursor:pointer;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM