我有一个上面有一个标题广告文本的图像,应该只有当悬停在图像上时才可见.标题和图像都包含一个链接,但我无法让该链接对我的图像起作用:当鼠标悬停在标题上时,链接起作用,但当鼠标悬停在图像上时,没有任何链接.我有this把小提琴.
<article>
<div class="entry-wrapper">
<header class="entry-header" >
<div class="entry-meta"><span>Text</span><h2><a href="https://www.google.com/" >Headline</a></h2>
</header>
<a href="https://www.google.com/" class="entry-thumbnail">
<img width="300" height="300" src="https://images.unsplash.com/photo-1597589827317-4c6d6e0a90bd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2080&q=80" alt="" decoding="async"></a>
<div class="entry-content entry-excerpt">
</div>
</div>
</article>
html *, html ::after, html ::before{
box-sizing:border-box}
.Entry-Wrapper{ 溢出:隐藏; 身高:100% }
article .entry-wrapper .entry-header{
opacity:0;
position:absolute;
z-index:15;
width:100%;
height:100%;
padding:30px;
color:white !important
}
article .entry-wrapper:hover .entry-header{
opacity:1;
transition:.3s ease-in-out;
background-color:#6C836F;
}
article .entry-wrapper{
position:relative
}
article .entry-thumbnail:hover{
opacity:1
}
.entry-小.entry-页眉,.home.entry-缩略图{ 页边距:0 } 文章.entry-wrapper.entry-Header a{ colored颜色 :白色!重要 } 第{条 宽度:300px; 高度:300px } .条目-缩略图{ 显示:块 }
<article>
<div class="entry-wrapper">
<header class="entry-header" >
<div class="entry-meta"><span>Text</span><h2><a href="https://www.google.com/" >Headline</a></h2>
</header>
<a href="https://www.google.com/" class="entry-thumbnail">
<img width="300" height="300" src="https://images.unsplash.com/photo-1597589827317-4c6d6e0a90bd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2080&q=80" alt="" decoding="async"></a>
<div class="entry-content entry-excerpt">
</div>
</div>
</article>
html *, html ::after, html ::before{
box-sizing:border-box}
.Entry-Wrapper{ 溢出:隐藏; 身高:100% }
article .entry-wrapper .entry-header{
opacity:0;
position:absolute;
z-index:15;
width:100%;
height:100%;
padding:30px;
color:white !important
}
article .entry-wrapper:hover .entry-header{
opacity:1;
transition:.3s ease-in-out;
background-color:#6C836F;
}
article .entry-wrapper{
position:relative
}
article .entry-thumbnail:hover{
opacity:1
}
.entry-小.entry-页眉,.home.entry-缩略图{ 页边距:0 } 文章.entry-wrapper.entry-Header a{ colored颜色 :白色!重要 } 第{条 宽度:300px; 高度:300px } .条目-缩略图{ 显示:块 }