Skip to content

Instantly share code, notes, and snippets.

@YeomanYe
Created December 24, 2016 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YeomanYe/557d744dcdc21e733ae37d89e938d61d to your computer and use it in GitHub Desktop.
Save YeomanYe/557d744dcdc21e733ae37d89e938d61d to your computer and use it in GitHub Desktop.
CSS:layout alignCenterByPadding
/*通过padding设置居中可用于,满幅背景,定宽的内容*/
.test{
padding:1em;
padding:1em calc(50% - 450px);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment