英文教程:用CSS控制和操作BODY标记
for them to be red on your contact page (for some reason). There are a couple ways you could go about this.
How it’s doneSimple, literally just apply the ID to the body tag:
Now for our example of making all links on the contact page red instead of blue, just use some CSS like this:
How about a more practical example?You got it. One of the most useful implementations of this technique is within navigation. Take a look at this sample navigation: See how the forums tab is the “active” tab? Certainly that’s just a slight change in CSS, probably just a shift in the position of a background image. Perhaps the XHTML looks something like this:
The “active” class applied to the list item is what shifts the background image. That’ll do the trick, but what about when we move to the Field Tips page? We will have to remove the active class from the forums tab and apply it t |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |