私のサイトに別の問題があります。私は自分の要素の1つに透明なPNGをホバーに追加したいが、それを手に入れることはできない。ここでは、コードは次のようになります。ダブルCSS背景IMGが動作しない
HTML:
<a class="item elipsis" href ="https://michalgrochowski.github.io/elipsis---flex/" target="_blank">
<p>PSD to HTML</p>
<p>Flexbox</p>
<p>Fixed heights and widths</p>
</a>
とCSS:
.elipsis {
display: block;
background-image: url("../img/elipsis.png");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
transition: all .3s ease-in-out;
}
.elipsis:hover {
background-image: url("../img/elipsis.png"), url("../img/black50.png");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
それが動作するように望んでいないのはなぜ?
background-image: url("../img/black50.png"), url("../img/elipsis.png");
まあ、彼らは最高の解決策がしばしば最も簡単だと言いますが、なぜ私はそれを理解できなかったのか分かりません。ありがとう、それは今働いている:) – grhu