gpt4 book ai didi

css - 为什么我无法在这种情况下使用 CSS 影响 H2 标题?

转载 作者:太空宇宙 更新时间:2023-11-03 23:59:20 25 4
gpt4 key购买 nike

我有一个幻灯片,我能够让描述以黄色显示,这是我想要的。

但是描述上方的标题 (H2) 是不可见的,除非您将鼠标悬停在它上面。我目前将其作为我的 CSS:

.slideshow_container { background: #000; }
.slideshow_container a { text-decoration: none; }
.slideshow_container .slideshow_slide { margin-right: 2px; }
.slideshow_container .slideshow_slide_text h2 { color: #FFFFFF; text-align: left;
font-size: 1.3em; }
.slideshow_container .slideshow_slide_text p { color: #FFFF00; font-weight: bold;
text-align: left; }
.slideshow_container .slideshow_slide_image { }
.slideshow_container .slideshow_slide_video { }
.slideshow_container .slideshow_description { background: #000; width: 100%; }
.slideshow_container .slideshow_description h2 { color: #FFFFFF; font-size: 1.3em;
text-align: left; }
.slideshow_container .slideshow_description p { color: #FFFF00; font-size: 1.1 em;
font-weight: bold; text-align: left; }
.slideshow_container .slideshow_description a { color: #FFFF00; font-weight: bold; }
.slideshow_container .slideshow_transparent { filter: alpha(opacity = 50); opacity: 0.5; }
.slideshow_container .slideshow_transparent:hover { filter: alpha(opacity = 80); opacity:
0.8; }

HTML:

<div class="slideshow_container slideshow_container_slideshow-jquery-image-gallery-custom-
styles_1" style="height: 600px; max-width: 660px;" data-session-id="0"><div
class="slideshow_controlPanel slideshow_transparent"><ul><li
class="slideshow_togglePlay"></li></ul></div><div
class="slideshow_button slideshow_previous slideshow_transparent"></div><div
class="slideshow_button slideshow_next slideshow_transparent"></div><div
class="slideshow_pagination"><div
class="slideshow_pagination_center"></div></div><div
class="slideshow_content" style="display: none;"><div
class="slideshow_view"><div
class="slideshow_slide slideshow_slide_image"> <a
target="_self" > <img src="http://www.occupyhln.org/wp-content/uploads/2013/07/Audrey-
Edmunds.jpg" alt="Audrey Edmunds" width="1000" height="588" /> </a><div
class="slideshow_description slideshow_transparent">
<h2><a target="_self" >Audrey Edmunds</a></h2>
<p><a target="_self" >Here, Audrey Edmunds poses at the John C. Burke Correctional Center
in Waupun, Wis., 10 years into serving her 18-year conviction and sentence for shaking a
baby to death, while babysitting. She was freed in Feb., 2008 after an appeals court said
new research into the syndrome cast doubt on her guilt. According to Northwestern
University's Center on Wrongful Convictions, experts asserted that symptoms they once
thought were proof of Shaken Baby Syndrome can be from other causes, including accidents,
illness, infection, old injuries, and congenital defects.</a></p>
</div></div><div style="clear: both;"></div></div>

段落部分似乎运行良好,描述显示为黄色。但我想让标题显示为白色,所以它很突出。目前,您必须将鼠标悬停在段落上方的标题上才能看到它们。

你可以在this particular page上看到杂耍...我试过对其进行 Firebug 处理,但似乎没有任何效果。

在这方面的任何指导将不胜感激!

最佳答案

这都是关于特异性 Id 覆盖任何类。

你有一个规则 #content h2 a, #content h2 a:visited 正如我所说覆盖你的 .slideshow_container .slideshow_description h2 选择器

阅读更多关于特异性的信息 Here .

关于css - 为什么我无法在这种情况下使用 CSS 影响 H2 标题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17431723/

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