标签: parent-child

父母身高未指定,如何让孩子继承?

我正在尝试创建父元素的子元素inheritheight但使用height:100%不起作用,可能是因为父元素的高度未知。这取决于帖子的大小。

我希望您将鼠标悬停在父元素上,此时子元素变得可见并占据与父元素完全相同的空间。

有什么办法可以做到这一点吗?最好只使用CSS。

提前致谢!

小提琴

html css parent-child

0
推荐指数
1
解决办法
645
查看次数

如何在 css 中设置特定段落元素的样式而不影响同一类中的其他段落?

我正在尝试对第 5 行中存在的段落元素进行样式设置(列出您的家属......吸烟习惯),但由于某些原因,它影响了同一类中存在的其他段落元素。我只想设置第 5 行(段落元素)的样式,而不影响同一类中存在的其他段落元素。

\n\n
<div class="inter">\n<div class="dependents">\n\n    <h2 class="my-life-events ttl"><!-- ko i18n: \'enrollNow.dependents\' -->My dependents<!-- /ko --></h2>\n    <p>List your dependents and enter their personal information. Pay close attention to information regarding your spouse\xe2\x80\x99s smoking habits</p>\n\n\n<div class="section header single">\n    <div class="inter">\n        <!-- ko i18n:\'dependents\' -->Dependents<!-- /ko -->\n        <div class="info header-sections" data-bind="popup: {\n                    popupId: \'info-popup\',\n                    closeOnOutsideClick: true,\n                    vm: {title: \'\', message: depend_info[locale.selected_locale()]}\n                }"></div>\n    </div>\n</div>\n\n<div class="section single">\n    <div class="inter">\n        <table cellspacing="0" cellpadding="0" class="table title">\n            <tbody><tr>\n                <td class="cell1"><!-- ko i18n:\'dependents.name\' -->Name<!-- /ko …
Run Code Online (Sandbox Code Playgroud)

html css inheritance parent-child

0
推荐指数
1
解决办法
1万
查看次数

父进程可以在同一时间向所有子进程发送信号吗?

我试图找出如何在同一秒内向 3 个子进程发送信号。你能向我解释一下为什么它可能或不可能吗?

如果可能的话,你能帮我理解在 C 中使用一些代码吗kill()

c signals kill process parent-child

0
推荐指数
1
解决办法
5938
查看次数

如何从父组件调用子组件的功能

就是看不懂

单击父组件中的按钮时如何调用子组件中的函数?

communication parent-child typescript angular

0
推荐指数
2
解决办法
1445
查看次数

java二进制搜索树查找父级

我正在研究一种寻找阳极母体的方法.我从根开始,然后沿着叶子向下,只要它们不是空的而不是孩子的节点.

下面是我的代码,它有点凌乱,因为我试图测试它看到什么出错.

我拥有的树是

        10
      /    \
     2     20
      \   / \
       3 18 22
            /
           21
Run Code Online (Sandbox Code Playgroud)

传入的x是20,所以10是父级,但是当我运行它时,22作为父级出现.while循环似乎不起作用,是不是我写的方式?

public Node<E> findParent(E x)
{
Node<E> node = root;

System.out.println("node is " + node.getData() + " before the search");
System.out.println("The value of x is " + x);
System.out.println("The value of node.getRight is " + node.getRight().getData());
boolean test = !node.getRight().getData().equals(x);
System.out.println("does nodes data equal x " + test);
while(((node!=null) && (node.getLeft()!=null) && (!node.getLeft().getData().equals(x))) || 
 ((node != null) && (node.getRight()!=null) && (!node.getRight().getData().equals(x))))
{ System.out.println("why didnt …
Run Code Online (Sandbox Code Playgroud)

java parent-child binary-search-tree

-1
推荐指数
1
解决办法
9073
查看次数