gpt4 book ai didi

angularjs - 使用父 div 类控制子 div css

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

我有一个矩形框,单击时可以调用模态框。框内是标签和展开图标。

<div class="clickable-box" ng-click="openRetailerGraphDetails()" data-toggle="modal" data-target="#g-retailer-purchases-graph">
<div class="dashboardBox clearfix">
<div class="pull-left dashboardBoxLabel purchases">
<h4 class="dashboardBoxLabeltext">
{{RetailerPurchases}} RETAILER PURCHASES
</h4>
<span class="dashboardBoxLabel2">
For the current month
</span>
</div>
<img class="pull-right expand-icon" src="themes/img/dashboard/expand.svg" />
</div>
</div>

当整个可点击框悬停时,我想将 img 标签内展开图标的不透明度从 0 更改为 0.7。我怎样才能实现它?

编辑:这是 css

.clickable-box {
cursor: pointer;
}

#dashboard .expand-icon {
width: 20px;
margin-top: 13px;
margin-right: -10px;
margin-bottom: -25px;
opacity: 0;
}

最佳答案

你可以使用:hover伪类:

#dashboard .clickable-box:hover img.expand-icon {
opacity: 0.7;
}

关于angularjs - 使用父 div 类控制子 div css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42965190/

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