现在的位置: 首页 > 综合 > 正文

Introduction to CSS

2013年10月13日 ⁄ 综合 ⁄ 共 251字 ⁄ 字号 评论关闭

1、样式表使用的两种方式

html文件中直接使用

<style>

p {

color:red;

  }

</style>

使用css文件

<link type="text/css" rel="stylesheet" href="stylesheet.css"/>

2、CSS的语法

h3 {
    color:red;
}

p {
    font-family:Courier;
}

span {
    background-color:yellow;
}

3、字体大小的设置

font-size:1em,这里的em是单位,它可以根据显示屏的大小而定,比px更动态

抱歉!评论已关闭.