一,效果图。
二,代码。
<!doctype html> <html> <head> <meta charset="utf-8"> <title>css padding</title> <style> p { background-color: yellow; } p.padding { padding-top: 25px; padding-bottom: 25px; padding-right: 50px; padding-left: 50px; } </style> </head> <body> <p>this is a paragraph with no specified padding.</p> <p class="padding">this is a paragraph with specified paddings.</p> </body> </html>
参考资料:《菜鸟教程》
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
css3 flex布局 justify-content:space-between 最后一行左对齐
网友评论