$(document).on("click", ".figure", function() {
$(".popover").css("opacity", "1");
})

.container {
position: relative;
}
.popover {
background-color: blue;
position: absolute;
top: 0;
left: 200px;
opacity: 0;
transition: opacity 0.5s ease-in-out 0s;
}
.figure:hover .popover {
opacity: 1;
}

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class='container'>
<div class='figure'>
<img src='https://placehold.it/100' />
</div>
<div class='popover'>
<p>
Bla bla
</p>
</div>
</div>
&#13;
答案 0 :(得分:3)
因为您的.popover
div不是.figure
div。
此
使用了+
选择器
$(document).on("click", ".figure", function() {
$(".popover").css("opacity", "1");
})
&#13;
.container {
position: relative;
}
.popover {
background-color: blue;
position: absolute;
top: 0;
left: 200px;
opacity: 0;
transition: opacity 0.5s ease-in-out 0s;
}
.figure:hover + .popover {
opacity: 1;
}
&#13;
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class='container'>
<div class='figure'>
<img src='https://placehold.it/100' />
</div>
<div class='popover'>
<p>
Bla bla
</p>
</div>
</div>
&#13;
答案 1 :(得分:0)
更改
"config": {
...
"ionic_rollup": "./config/rollup.config.js",
"ionic_cleancss": "./config/cleancss.config.js",
...
},
收件人:
.figure:hover .popover {
opacity: 1;
}
答案 2 :(得分:-1)