CSDN博客变形小技巧之二

来源:互联网 发布:windows 密码错误 编辑:程序博客网 时间:2024/04/30 07:02
CSDN博客变形小技巧之二

By DaNmarner  http://blog.csdn.net/DaNmarner  DaNmarner@gmail.com
欢迎转载,请注明作者和出处!

 CSDN博客的keso皮肤使用的链接文字效果是html默认的,其实通过css我们完全可以制定自己风格的链接。以我的blog为例,代码如下:

 

a:visited,
a:active,
a:link {
       color: #000000;
       text-decoration: none;
}

a:hover {
       color: red;
       text-decoration : underline;
       }

这段代码含义从字面理解即可,简单的说就是:

 

定义已经访问过的链接 和(逗号)
当前活动的链接 和
普通的链接{
      颜色:颜色代码;
      文字样式:无;
}

定义鼠标悬停时的链接{
      颜色:红色;
      文字样式:下划线;
}

 color后面可以使用颜色代码或者red,blue这样的颜色,text-decoration也是css的标准语句,后面可用的选项有None/underline/overline/line-through/blink

当然a:visited,a:active也可以根据需要单独定义,模式和a:hover一样。

<iframe name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-1391084545775812&amp;dt=1188375788593&amp;lmt=1188375782&amp;format=468x15_0ads_al_s&amp;output=html&amp;correlator=1188375788578&amp;channel=7913117752&amp;url=file%3A%2F%2F%2FC%3A%2FDocuments%2520and%2520Settings%2FAdministrator%2F%E6%A1%8C%E9%9D%A2%2Faaa.htm&amp;color_bg=FFFFFF&amp;color_text=000000&amp;color_link=000000&amp;color_url=000000&amp;color_border=FFFFFF&amp;ga_vid=199681080.1188375789&amp;ga_sid=1188375789&amp;ga_hid=289079605&amp;flash=9&amp;u_h=768&amp;u_w=1280&amp;u_ah=738&amp;u_aw=1280&amp;u_cd=32&amp;u_tz=480&amp;u_java=true" frameborder="0" width="468" scrolling="no" height="15" allowtransparency="allowtransparency"></iframe>

<script type="text/javascript"><!--google_ad_client = "pub-1391084545775812";google_ad_width = 468;google_ad_height = 60;google_ad_format = "468x60_as";google_ad_type = "text";//2007-09-03: CSDN文章内底部468*60google_ad_channel = "8802996721";google_color_border = "FFFFFF";google_color_bg = "FFFFFF";google_color_link = "000000";google_color_text = "000000";google_color_url = "000000";//--></script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>

<iframe name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-1391084545775812&amp;dt=1188375788953&amp;lmt=1188375782&amp;prev_fmts=468x15_0ads_al_s&amp;format=468x60_as&amp;output=html&amp;correlator=1188375788578&amp;channel=8802996721&amp;url=file%3A%2F%2F%2FC%3A%2FDocuments%2520and%2520Settings%2FAdministrator%2F%E6%A1%8C%E9%9D%A2%2Faaa.htm&amp;color_bg=FFFFFF&amp;color_text=000000&amp;color_link=000000&amp;color_url=000000&amp;color_border=FFFFFF&amp;ad_type=text&amp;cc=916&amp;ga_vid=199681080.1188375789&amp;ga_sid=1188375789&amp;ga_hid=289079605&amp;flash=9&amp;u_h=768&amp;u_w=1280&amp;u_ah=738&amp;u_aw=1280&amp;u_cd=32&amp;u_tz=480&amp;u_java=true" frameborder="0" width="468" scrolling="no" height="60" allowtransparency="allowtransparency"></iframe>