【发布时间】:2021-10-23 02:05:03
【问题描述】:
如果我们使用会发生什么
<container>
<red>I'm Red If Working 100%</red>
</container>
而不是使用
<div class=container>
<div class=red>
I'm Red If Working 100%
</div>
</div>
无论如何 CSS 和 JS 都可以工作
$("red").on("click", function(){ alert("Working 100%") });
container{
position:absolute;
top:0;
left:0;
right:0;
bottom:0;
overflow:auto;
}
red{ color:red; }
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<container>
<red>I'm Red If Working 100%</red>
</container>
如果我们使用这些会有什么问题吗?
【问题讨论】:
-
是的,至少一周后我得到了答复,谢谢