Skip to content

Instantly share code, notes, and snippets.

@ourai
Created June 13, 2013 03:01
Show Gist options
  • Save ourai/5770935 to your computer and use it in GitHub Desktop.
Save ourai/5770935 to your computer and use it in GitHub Desktop.
自适应的九宫格图片

前提(要求)

  • 容器为九宫格,宽度根据页面自适应
  • 可为正方形、横向矩形或纵向矩形
  • 视觉显示必须为正方形,也就是相对短的边 100% 显示,相对长的边被容器遮住
  • 相对于容器水平垂直居中
  • 兼容 IE7+ 及其他浏览器
@shenwa12
Copy link

shenwa12 commented Sep 3, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment