请问a标签能包含div标签吗,a标签是行内元素,div标签是块元素
<div class="banner" id="banner">
<a href="">
<div class="banner-slide slide1 slide-active"></div>
</a>
<a href="">
<div class="banner-slide slide2"></div>
</a>
<a href="">
<div class="banner-slide slide3"></div>
</a>
</div>
13
收起
正在回答 回答被采纳积分+1
3回答
慕尼黑7895541
2020-04-11 15:17:12
HTML5标准文档说明
The a element may be wrapped around entire paragraphs, lists, tables, and so forth, even entire sections, so long as there is no interactive content within (e.g. buttons or other links). ...used to make an entire advertising block into a link
说明a标签在块级标签行内标签规则上,没有限制。a > div a > table a > ul 都是可行的
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星