gpt4 book ai didi

html - 如何在弹出窗口中隐藏特定行

转载 作者:太空宇宙 更新时间:2023-11-04 13:20:32 25 4
gpt4 key购买 nike

这是网站的代码:

<div class="infoBox" style="position: absolute; visibility: visible; width: 450px; left: 504.626px; top: -103.94px;">

<div class="marker-wrapper animated fadeInDown">
<div class="marker-title"></div>
<div class="marker-content">
<div class="two_third popup-content">
<ul>
<li></li>
<li>
<span class="icon-link"></span>
<a href="http://www.hotelesavant.com" target="_blank" rel="nofollow"></a>
</li>
</ul>
</div>
<div class="one_third last image-wrapper pop-image"></div>

在自定义 CSS 上写这个,隐藏整个弹出框:

.popup-content ul li {
margin-bottom: 5px;
color: #5A5A5A;
}

但我只想隐藏这个:

<li>
<span class="icon-link"></span>
<a href="http://www.hotelesavant.com" target="_blank" rel="nofollow"></a>
</li>

此致问候...并在此先致谢!

最佳答案

你可以使用最后一个 child :

.popup-content ul li:last-child { display:none;}

编辑:如果有问题的“LI”元素最终不是最后一个 li,那么您还有其他选择:

li:nth-child(#index of the element)

在你的情况下:

li:nth-child(1)

当然除非你可以给它添加一个类。

关于html - 如何在弹出窗口中隐藏特定行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24103767/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com