Target outer div based on class of inner a

别等时光非礼了梦想. 提交于 2019-12-11 13:45:13

问题


Say I have something like this:

<div class="entry">
   <a class="click" href="http://domain.com">Some link</a>
</div>

<div class="entry">
   <a class="unclick" href="http://domain.com">Some link</a>
</div>

How would I target the entire contents of a .entry surrounding an a.click, without affecting the .entry surrounding of an a.unclick

I want to hide the outer div if the link has a class of "click".

EDIT: I need to do this without resorting to javascript, only CSS and HTML.

来源:https://stackoverflow.com/questions/13782487/target-outer-div-based-on-class-of-inner-a

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!