HTML中a标签莫名出现多出的问题
作者:互联网
源代码html片段:
<div id="app">
<div data-v="" class="page-container">
<div data-v="" style="height: 736px;">
<div data-v2="" data-v="" class="page">
<div data-v2="" data-v3="" class="download-btn">
<a class="download-btn-a" href="http://img.zjrc.com/news/app/rencai1.1.apk">
</div>
</div>
</div>
</div>
</div>
浏览器生成后的html片段:
<div id="app">
<div data-v="" class="page-container">
<div data-v="" style="height: 736px;">
<div data-v2="" data-v="" class="page">
<div data-v2="" data-v3="" class="download-btn">
<a class="download-btn-a one-pan-link-mark" href="http://img.zjrc.com/news/app/rencai1.1.apk">
</a></div>
<a class="download-btn-a one-pan-link-mark" href="http://img.zjrc.com/news/app/rencai1.1.apk">
</a></div>
<a class="download-btn-a one-pan-link-mark" href="http://img.zjrc.com/news/app/rencai1.1.apk">
</a></div>
<a class="download-btn-a one-pan-link-mark" href="http://img.zjrc.com/news/app/rencai1.1.apk">
</a></div>
<a class="download-btn-a one-pan-link-mark" href="http://img.zjrc.com/news/app/rencai1.1.apk">
</a>
</div>
问题:
<a class="download-btn-a" href="http://img.zjrc.com/news/app/rencai1.1.apk">
解决:
<a class="download-btn-a" href="http://img.zjrc.com/news/app/rencai1.1.apk"></a>
仔细查看源代码发现,是a标签少了闭合标签</a>
导致的,补上闭合标签</a>
就正常了。
标签:片段,标签,html,莫名,闭合,HTML,源代码 来源: https://www.cnblogs.com/KillBugMe/p/13231626.html