css 谁能告诉我我的代码出了什么问题?

lnlaulya  于 2022-12-24  发布在  其他
关注(0)|答案(1)|浏览(151)

why is it happening
我在一个链接中创建了一个,作为div链接的子链接,但是我不知道为什么父链接会出现在div中。我是html/css的新手,请帮助我。并告诉我应该知道哪些事情才不会犯这些错误
这是我代码
https://codepen.io/Poink/pen/OJwJdrP

<a class="AB" href="https://zoro.to/steinsgate-3?ref=search">
<div class="Queen">
    <div class="a">Steins Gate</div>
    <div class="b"><span style="color: rgb(168, 164, 164);">⭐9.09</span></div>
    <div class="c"><span style="color: rgb(168, 164, 164);">Ep24/24</span></div>
    <div class="ac"></div>
    <div class="d"><span style="color: rgb(0, 0, 0);">TV</span></div>
    <div class="e">
        <span style="color: rgb(168, 164, 164);">
            The self-proclaimed mad scientist Rintarou
            Okabe rents out a room in a rickety old building in 
            Akihabara, where he indulges...
        </span>
    
    
    </div>

谢谢您的帮助。

2ul0zpep

2ul0zpep1#

您没有关闭所有div,这就是为什么显示到div的链接

<body>
    
    
<div class="King">
<div class="A"></div>
<div class="ab">Steins Gate</div>
<div class="B"></div>
<div class="C">SUB</div>
<div class="D">DUB</div>
<div class="E">Ep24/24</div>
<div class="F">Steins Gate</div>
<div class="G"> <span style="color: gray;">TV</span></div>
<div class="H"></div>
<div class="I"> <span style="color: gray;">24m</span></div>
</div>
<a class="AB" href="https://zoro.to/steinsgate-3?ref=search">
    <div class="Queen">
        <div class="a">Steins Gate</div>
    <div class="b"><span style="color: rgb(168, 164, 164);">⭐9.09</span></div>
    <div class="c"><span style="color: rgb(168, 164, 164);">Ep24/24</span></div>
    <div class="ac"></div>
    <div class="d"><span style="color: rgb(0, 0, 0);">TV</span></div>
    <div class="e"><span style="color: rgb(168, 164, 164);">The self-proclaimed mad scientist Rintarou
         Okabe rents out a room in a rickety old building in 
         Akihabara, where he indulges...</span>
        </div>
        
    </div>
   
       
</a>        

</body>
</html>

相关问题