📄 css_units.asp@output=print
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Units</title>
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />
<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</head>
<body>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
<h1>CSS Units</h1>
<a href="css_ref_aural.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="css_colors.asp"> <img border="0" src="../images/btn_next.gif" width="100" height="20" alt="Next" /></a>
<hr />
<h3>Measurements</h3>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr>
<th align="left" width="25%">Unit</th>
<th align="left" width="75%">Description</th>
</tr>
<tr>
<td valign="top">%</td>
<td valign="top">percentage</td>
</tr>
<tr>
<td valign="top">in</td>
<td valign="top">inch</td>
</tr>
<tr>
<td valign="top">cm</td>
<td valign="top">centimeter</td>
</tr>
<tr>
<td valign="top">mm</td>
<td valign="top">millimeter</td>
</tr>
<tr>
<td valign="top">em</td>
<td valign="top">1em is equal to the current font size. 2em means 2 times
the size of the current font. E.g., if an element is displayed with a font
of 12 pt, then '2em' is 24 pt. The 'em' is a very useful unit in CSS, since
it can adapt automatically to the font that the reader uses</td>
</tr>
<tr>
<td valign="top">ex</td>
<td valign="top">one ex is the x-height of a font (x-height is usually
about half the font-size)</td>
</tr>
<tr>
<td valign="top">pt</td>
<td valign="top">point (1 pt is the same as 1/72 inch)</td>
</tr>
<tr>
<td valign="top">pc</td>
<td valign="top">pica (1 pc is the same as 12 points)</td>
</tr>
<tr>
<td valign="top">px</td>
<td valign="top">pixels (a dot on the computer screen)</td>
</tr>
</table>
<h3>Colors</h3>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr>
<th align="left" width="25%">Unit</th>
<th align="left" width="75%">Description</th>
</tr>
<tr>
<td valign="top"><i>color_name</i></td>
<td valign="top">A color name (e.g. red)</td>
</tr>
<tr>
<td valign="top">rgb(x,x,x)</td>
<td valign="top">An RGB value (e.g. rgb(255,0,0))</td>
</tr>
<tr>
<td valign="top">rgb(x%, x%, x%)</td>
<td valign="top">An RGB percentage value (e.g. rgb(100%,0%,0%))</td>
</tr>
<tr>
<td valign="top">#rrggbb</td>
<td valign="top">A HEX number (e.g. #ff0000)</td>
</tr>
</table>
<br />
<hr />
<a href="css_ref_aural.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="css_colors.asp"><img border="0" src="../images/btn_next.gif" width="100" height="20" alt="Next" /></a>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -