首页
极刻
圈子
教程
开源
登录 / 注册
返回教程:CSS 教程
TRY RUN / 在线示例
CSS 教程 文本的上边距设置使用厘米值
CSS 教程 文本的上边距设置使用厘米值
源代码
运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>安科教程(www.ancii.com)</title> <style> p.ex1 {margin-top:2cm;} </style> </head> <body> <p>A paragraph with no margins specified.</p> <p class="ex1">A paragraph with a 2cm top margin.</p> <p>A paragraph with no margins specified.</p> </body> </html>
运行结果