我在WP中设计的网站的标题具有运行主题,标题的前半部分使用一种颜色,然后下半部使用一种强调符号,并带有静态标题,使用span标签即可轻松做到这一点,即
HTML:
<h1>This Is <span>My Headline</span></h1>
CSS:
h1 {color:#1f7b76;}
span {color:#75b482}
但是,由于标题是动态的,因此我不确定如何在WordPress框架内实现此功能。
I looked at this answer but I don't think this would work with WordPress the way it's required Color effect for headlines
.span
is trying to call a class of span, not the span. Check hereCSS的第二行当前正在尝试使用span类将任何H1元素作为目标。要定位H1内的跨度,可以使用以下命令: