feiyang10086 发表于 2012-02-25 21:23

css 学习总结 1

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;



      }

健康木乃伊 发表于 2012-02-25 21:24

谢谢分享
页: [1]
查看完整版本: css 学习总结 1