css 学习总结 1

  样式表是一组格式化的指令,能同时控制众多HTML页面的外观,css是定义样式的语言。

     学习css网站:http://www.webstyles-chinese.info/Style/CSS/

  内部样式直接放在网页中<div style="color:green"></div>

  外部样式:<link rel="stylesheet" type="text/css" href="styles.css"/>

  字体的大小统一用pt,尺寸统一用像素。

  当用图像链接时想去掉边框 请设置border-style:none;

  样式类

  h1.silly{font:36pt Comic Sans;}

  h1.serious{font:36pt Arial;}

  <h1 class="silly">hello</h1>

  <h1 class="serious">hi,nihao</h1>

  this text is green,but<span style="color:red">this text is red.</span>Back to green again

  修改链接的外观

  Link:链接尚未访问过;Hover:鼠标指向链接;Active:链接被激活如用鼠标单击;Visited:链接被访问过。

  伪类样式:

    a:link{

        color:#19619A; font-weight:bold;text-decoration:none;

        }

  使用通用类:

    .bold{font-weigh:bold;}

      指定多个选择符:

    a:link,a:visited,a:active{

        color:#19619A; font-weight:bold;text-decoration:none;

 

        }

  混合样式类

  a.emphasis:link{

        color:#19619A; font-weight:bold;text-decoration:none;

 

        }

 

 

  

posted @ 2012-02-16 10:15  yikeshu  阅读(331)  评论(0)    收藏  举报