实例首页
自学教程
IT工具箱
源代码
下载代码
上下布局
点击运行 >
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>css font-size 实例 - 自学教程(runoops.com)</title> <style> body { font-size: 100%; } h1 { font-size: 2.5em; } h2 { font-size: 1.875em; } p { font-size: 0.875em; } </style> </head> <body> <h1>This is heading 1</h1> <h2>This is heading 2</h2> <p>This is a paragraph.</p> <p>在所有浏览器中,可以显示相同的文本大小,并允许所有浏览器缩放文本的大小。</p> </body> </html>
运行结果: