Skip to content

内边距

定义

通过 p-* 工具类设置内边距,可用的工具类包括:

工具类CSS 属性
p-autopadding: auto;
px-autopadding-left: auto; padding-right: auto;
py-autopadding-top: auto; padding-bottom: auto;
pt-autopadding-top: auto;
pr-autopadding-right: auto;
pb-autopadding-bottom: auto;
pl-autopadding-left: auto;
p-0padding: 0px;
p-pxpadding: 1px;
p-0.5padding: 2px;
p-1padding: 4px;
p-1.5padding: 6px;
p-2padding: 8px;
p-2.5padding: 10px;
p-3padding: 12px;
p-3.5padding: 14px;
p-4padding: 16px;
p-5padding: 20px;
p-6padding: 24px;
p-7padding: 28px;
p-8padding: 32px;
p-9padding: 36px;
p-10padding: 40px;
px-0padding-left: 0px; padding-right: 0px;
py-0padding-top: 0px; padding-bottom: 0px;
pt-0padding-top: 0px;
pr-0padding-right: 0px;
pb-0padding-bottom: 0px;
pl-0padding-left: 0px;
px-pxpadding-left: 1px; padding-right: 1px;
py-pxpadding-top: 1px; padding-bottom: 1px;
pt-pxpadding-top: 1px;
pr-pxpadding-right: 1px;
pb-pxpadding-bottom: 1px;
pl-pxpadding-left: 1px;
px-0.5padding-left: 2px; padding-right: 2px;
py-0.5padding-top: 2px; padding-bottom: 2px;
pt-0.5padding-top: 2px;
pr-0.5padding-right: 2px;
pb-0.5padding-bottom: 2px;
pl-0.5padding-left: 2px;
px-1padding-left: 4px; padding-right: 4px;
py-1padding-top: 4px; padding-bottom: 4px;
pt-1padding-top: 4px;
pr-1padding-right: 4px;
pb-1padding-bottom: 4px;
pl-1padding-left: 4px;
px-1.5padding-left: 6px; padding-right: 6px;
py-1.5padding-top: 6px; padding-bottom: 6px;
pt-1.5padding-top: 6px;
pr-1.5padding-right: 6px;
pb-1.5padding-bottom: 6px;
pl-1.5padding-left: 6px;
px-2padding-left: 8px; padding-right: 8px;
py-2padding-top: 8px; padding-bottom: 8px;
pt-2padding-top: 8px;
pr-2padding-right: 8px;
pb-2padding-bottom: 8px;
pl-2padding-left: 8px;
px-2.5padding-left: 10px; padding-right: 10px;
py-2.5padding-top: 10px; padding-bottom: 10px;
pt-2.5padding-top: 10px;
pr-2.5padding-right: 10px;
pb-2.5padding-bottom: 10px;
pl-2.5padding-left: 10px;
px-3padding-left: 12px; padding-right: 12px;
py-3padding-top: 12px; padding-bottom: 12px;
pt-3padding-top: 12px;
pr-3padding-right: 12px;
pb-3padding-bottom: 12px;
pl-3padding-left: 12px;
px-3.5padding-left: 14px; padding-right: 14px;
py-3.5padding-top: 14px; padding-bottom: 14px;
pt-3.5padding-top: 14px;
pr-3.5padding-right: 14px;
pb-3.5padding-bottom: 14px;
pl-3.5padding-left: 14px;
px-4padding-left: 16px; padding-right: 16px;
py-4padding-top: 16px; padding-bottom: 16px;
pt-4padding-top: 16px;
pr-4padding-right: 16px;
pb-4padding-bottom: 16px;
pl-4padding-left: 16px;
px-5padding-left: 20px; padding-right: 20px;
py-5padding-top: 20px; padding-bottom: 20px;
pt-5padding-top: 20px;
pr-5padding-right: 20px;
pb-5padding-bottom: 20px;
pl-5padding-left: 20px;
px-6padding-left: 24px; padding-right: 24px;
py-6padding-top: 24px; padding-bottom: 24px;
pt-6padding-top: 24px;
pr-6padding-right: 24px;
pb-6padding-bottom: 24px;
pl-6padding-left: 24px;
px-7padding-left: 28px; padding-right: 28px;
py-7padding-top: 28px; padding-bottom: 28px;
pt-7padding-top: 28px;
pr-7padding-right: 28px;
pb-7padding-bottom: 28px;
pl-7padding-left: 28px;
px-8padding-left: 32px; padding-right: 32px;
py-8padding-top: 32px; padding-bottom: 32px;
pt-8padding-top: 32px;
pr-8padding-right: 32px;
pb-8padding-bottom: 32px;
pl-8padding-left: 32px;
px-9padding-left: 36px; padding-right: 36px;
py-9padding-top: 36px; padding-bottom: 36px;
pt-9padding-top: 36px;
pr-9padding-right: 36px;
pb-9padding-bottom: 36px;
pl-9padding-left: 36px;
px-10padding-left: 40px; padding-right: 40px;
py-10padding-top: 40px; padding-bottom: 40px;
pt-10padding-top: 40px;
pr-10padding-right: 40px;
pb-10padding-bottom: 40px;
pl-10padding-left: 40px;

示例

MIT License (MIT)