How do I do it.
#foo, #ball, #tre开发者_Python百科e h1 {color: #892828;}
Does not seem to work?
if you want to style all H1 under those Ids, you have to repeat H1 for every one as they don't share anything:
#foo h1, #ball h1, #tree h1 {color: #892828;}
what you wrote is equivalent to:
#foo {color: #892828;}
#ball {color: #892828;}
#tree h1 {color: #892828;}
You could also assign the same class to each of those h1s and style using that class.
精彩评论