开发者

Selecting different parts of css selector

Is it possible in a selector like this:

div table

Select the divs that have been filtered? As in divs that contain a table instead of all tables that a开发者_开发百科re in divs.


CSS selectors can not ascend. It is one of their limitations.

Also see Does CSS have anything like jQuery's :has()?


No, but you can normally solve this problem with adding classes to your div elements, to help differentiate them from other divs.


This can however be done with Jquery with .parent() .parents() or :parentMight be something work checking out.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜