⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 css11.htm

📁 CSS的介绍
💻 HTM
字号:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!-- A:link {text-decoration: none; color:#0072A8}
     A:visited {text-decoration: none; color: #0072A8}
     A:active {text-decoration: none; color: #FF0000}
     A:hover {text-decoration: underline; color: FF0000}
       body{font-size=9pt}
	TH{FONT-SIZE: 9pt}
   TD{ FONT-SIZE: 9pt}-->
</style>
<meta name="keywords" content="homepage,designer,免费,html,Dhtml,CGI,DW,flash,fireworks,java,Javascript,CGI,frontpage,photoshop,free,原代码,教程">
<meta name="Author" content="kunshan,china,ajie,阿捷,ajie@nease.net">
<title>CSS中文教程--CSS 单位</title>
</head>

<body bgcolor="#FFFFFF">

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="9%"></td>
    <td width="81%"><p align="center"><img src="csstop.gif" alt="csstop.gif (6568 bytes)" WIDTH="420" HEIGHT="58"></td>
    <td width="10%"></td>
  </tr>
  <tr>
    <td width="9%"></td>
    <td width="81%"><table border="1" width="100%" bordercolor="#000000" cellspacing="0" cellpadding="0">
      <tr>
        <td width="100%" bgcolor="#C0C0C0"><p align="center"><a href="index.htm">返回<font face="Arial">DHTML</font>栏目</a> <a href="../index.html">返回首页</a>  本教程译文:<a href="mailto:water_tang@126.com">Water Tang</a> 和 <a href="mailto:tian_tang@126.com">Xianzhen 
        Liang</a></td>
      </tr>
    </table>
    </td>
    <td width="10%"></td>
  </tr>
</table>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="9%"></td>
    <td width="81%"><hr color="#808080">
    </td>
    <td width="10%"></td>
  </tr>
  <tr>
    <td width="9%"></td>
    <td width="81%"><p align="center">CSS 单位</p>
    <p>--------------------------------------------------------------------------------<br>
    <br>
    <strong>长度单位</strong><br>
    一个长度的值由可选的正号&quot; + &quot;或负号&quot; - &quot;、接着的一个数字、还有标明单位的两个字母组成。在一个长度的值之中是没有空格的,例如,1.3 
    em就不是一个有效的长度的值,但1.3em就是有效的。一个为零的长度不需要两个字母的单位声明。<br>
    <br>
    无论是相对值还是绝对值长度,CSS1都支持。相对值单位确定一个相对于另一长度属性的长度,因为它能更好地适应不同的媒体,所以是首选的。以下是有效的相对单位: 
    <br>
    <br>
    em (em,元素的字体的高度) <br>
    ex (x-height,字母 &quot;x&quot; 的高度) <br>
    px (像素,相对于屏幕的分辨率) <br>
    绝对长度单位视输出介质而定,所以逊色于相对单位。以下是有效的绝对单位: 
    <br>
    <br>
    in (英寸,1英寸=2.54厘米) <br>
    cm (厘米,1厘米=10毫米) <br>
    mm (米) <br>
    pt (点,1点=1/72英寸) <br>
    pc (帕,1帕=12点) <br>
    <br>
    --------------------------------------------------------------------------------<br>
    <br>
    <strong>百分比单位</strong><br>
    一个百分比值由可选的正号&quot;+&quot;或负号&quot;-&quot;、接着的一个数字,还有百分号&quot;%&quot;。在一个百分比值之中是没有空格的。<br>
    <br>
    百分比值是相对于其它数值,同样地用于定义每个属性。最经常使用的百分比值是相对于元素的字体大小。<br>
    <br>
    <br>
    --------------------------------------------------------------------------------<br>
    <br>
    <strong>颜色单位</strong><br>
    颜色值是一个关键字或一个RGB格式的数字。<br>
    <br>
    Windows VGA(视频图像阵列)形成了16各关键字: aqua,black, blue,fuchsia,gray,green, 
    lime,maroon,navy,olive, purple,red,silver,teal,white,and yellow。<br>
    <br>
    RGB颜色可以有四种形式: <br>
    <br>
    #rrggbb (如,#00cc00) <br>
    #rgb (如,#0c0) <br>
    rgb(x,x,x) x是一个介乎0到255之间的整数 (如,rgb(0,204,0)) <br>
    rgb(y%,y%,y%) y是一个介乎0.0到100.0之间的整数 (如,rgb(0%,80%,0%)) <br>
    上述的例子指定同一颜色。<br>
    <br>
    Douglas R. Jacobson先生还开发了速查手册RGB Color Chart (61 kB)。<br>
    <br>
    <br>
    --------------------------------------------------------------------------------<br>
    <br>
    <strong>统一资源管理URLs</strong><br>
    一个URL值的格式为 : url(foo),foo是一个URL(统一资源管理,因特网的地址)。URL可以选择用单引号( 
    ' )或者双引号( &quot; ),并且,在URL之前或之后可以包含空格。<br>
    <br>
    在URL中的括弧,逗号,空格,单引号,或双引号必须避开反斜杠。不完整的URLs被理解为样式表的源代码,而不是HTML源代码。<br>
    <br>
    注意: Netscape Navigator 4.x 会错误地将不完整的URLs理解为相关的HTML源代码。注意到这个错误后,网页制作者应该在可能的地方使用完整的URLs。<br>
    <br>
    例如:<br>
    <br>
    BODY { background: url(stripe.gif) }<br>
    BODY { background: url(http://www.htmlhelp.com/stripe.gif) }<br>
    BODY { background: url( stripe.gif ) }<br>
    BODY { background: url(&quot;stripe.gif&quot;) }<br>
    BODY { background: url(\&quot;Ulalume\&quot;.png) } /* quotes in URL escaped */<br>
    <br>
    <br>
    (未完)<br>
    --------------------------------------------------------------------------------<br>
    <br>
    版权信息:本教程是根据W3C制定的CSS标准语法英文版本由<a href="mailto:water_tang@126.com">Water Tang</a>和<a href="mailto:tian_tang@126.com">Xianzhen 
    Liang</a>翻译而成的。<br>
         由《<a href="http://pageone.yeah.net" target="_blank">网页设计师</a>》制作网页教程,你可以转载本教程,但请尊重译者和阿捷的辛勤劳动。<br>
         转载时注明译者和教程出处。谢谢!</p>
    <p align="right"> <a href="css10.htm">上一节</a> <a href="css12.htm">下一节</a> <a href="index.htm">返回dhtml栏目</a> <a href="../index.html">返回首页</a></td>
    <td width="10%"></td>
  </tr>
</table>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%"><hr color="#000000" width="90%">
    </td>
  </tr>
  <tr>
    <td width="100%" align="center">《<a href="http://pageone.yeah.net">网页设计师</a>》 
    阿捷制作 </td>
  </tr>
  <tr>
    <td width="100%" align="center"><font face="Arial">&copy;1999-2000</font> <font face="Arial">All Rights Reserved</font></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -