<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>填充</title> <style> p { background-color: yellow; } p.padding { padding-top: 25px; padding-bottom: 25px; padding-left: 50px; padding-right: 50px; } </style> </head> <body> <!-- 修改一个标签,另外一个标签同时修改 插件 Auto Rename Tag --> <h3> 填充- 单边内边距属性</h3> <p>这是一个没有指定填充边距的段落。</p> <p class="padding">This is a paragraph that specifies padding margins</p> </body> </html>
效果