Set font size u...LOGIN

Set font size using px

Example analysis:

Use px in the font-size attribute to set the text size, which can completely control the text size.

px: pixel (a point on the computer screen)

Description: px is an absolute unit, specifying the absolute size.

Next Section
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文网(php.cn)</title> <style> h1 {font-size:40px;} h2 {font-size:30px;} p {font-size:14px;} </style> </head> <body> <h1>This is heading 1</h1> <h2>This is heading 2</h2> <p>This is a paragraph.</p> <p>允许在 Internet Explorer 9, Firefox, Chrome, Opera, 和 Safari 中通过缩放浏览器调整文本大小。</p> <p><b>注意:</b>这个例子在 IE9之前的版本不工作。</p> </body> </html>
submitReset Code
ChapterCourseware