我必须在两个页面上设置不同的跨度样式,父页面和弹出窗口,当我们单击父页面上的链接时,弹出窗口打开。如果我通过css类更改样式,父页面上的SPAN样式将受到影响。如何只在弹出窗口中选择跨度,而不在父页面上选择跨度?该页面是分享点页面上添加了一些新闻导航器网页部件。这是需要修改的SPAN类。
<span class="ngPresenceSpan">
<a title="" class="ngAuthorLink" target="_parent" authorid="" show="function(some jquery function here)
当我通过IE开发人员工具检查时,弹出窗口中也显示了相同的HTML。我必须改变字体和填充内容与跨度.ngPresenceSpan仅在弹出窗口
发布于 2015-04-07 21:23:54
@Deepika你可以使用CSS [attribute]
选择器。检查DEMO。
例如,*将选择文本anch
。
span.ngPresenceSpan a[title*="anch"]{color:red;}
和像这样的HTML。
<span class="ngPresenceSpan">
<a title="anchor" class="ngAuthorLink" target="_parent" authorid="" show="function(some jquery function here)" href="#">
TEXT </a>
<p> </p>
<span class="ngPresenceSpan">
<a href="#" title="anch">Another same text in span</a> </span>
发布于 2015-04-07 21:06:30
如果我理解正确,那么您应该为特定SPAN元素提供一个id,然后在css中设置它的样式。像这样:
<span id="popup-span">something</span>
然后在css中:
#popup-span{
//style here
}
https://stackoverflow.com/questions/29492221
复制相似问题