首页
极刻
圈子
教程
开源
登录 / 注册
返回教程:CSS 教程
TRY RUN / 在线示例
CSS 教程 在一个声明中的所有填充属性
CSS 教程 在一个声明中的所有填充属性
源代码
运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>安科教程(www.ancii.com)</title> <style> p.ex1 {padding:2cm;} p.ex2 {padding:0.5cm 3cm;} </style> </head> <body> <p class="ex1">This text has equal padding on each side. The padding on each side is 2cm.</p> <p class="ex2">This text has a top and bottom padding of 0.5cm and a left and right padding of 3cm.</p> </body> </html>
运行结果