Advertisement
Guest User

Untitled

a guest
Oct 21st, 2015
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.78 KB | None | 0 0
  1. /* Mobile First, Default */
  2. .column {width: 100%;}
  3. .row {width: 100%;}
  4.  
  5. /* Animate on Resize */
  6. .row, .column {
  7.   -webkit-transition: all 0.5s ease;  /* Safari and Chrome */
  8.   -moz-transition: all 0.5s ease;     /* Firefox */
  9.   -ms-transition: all 0.5s ease;      /* IE 9 */
  10.   -o-transition: all 0.5s ease;       /* Opera */
  11.   transition: all 0.5s ease;
  12. }
  13.  
  14. /* mobile up */
  15. @media only screen and (min-width: 768px) {
  16.   .triplet .column, .column {float: left;}
  17.   .column.full {width: 100%;}
  18.   .row .column.one-third {width: 33.3%;}
  19.   .row .column.two-thirds {width: 66.6%;}
  20. }
  21.  
  22. /* small tablets */
  23. @media only screen and (min-width: 768px) and (max-width: 959px) {
  24.   .triplet .column {width: 33.3%;}
  25.   .column {width: 50%;}
  26.   .column.full {width: 100%;}
  27.   .column.half {width: 50%;}
  28. }
  29.  
  30. /* tablet */
  31. @media only screen and (min-width: 960px) and (max-width: 1199px) {
  32.   .column {width: 33.3%;}
  33.   .triplet .column {width: 33.3%;}
  34.   .column.full {width: 100%;}
  35.   .column.half {width: 50%;}
  36. }
  37.  
  38. /* desktops */
  39. @media only screen and (min-width: 1200px) {
  40.   .column {width: 25%;}
  41.   .triplet .column {width: 33.3%;}
  42.   .column.full {width: 100%;}
  43.   .column.half {width: 50%;}
  44. }
  45.  
  46. @media only screen and (min-width: 1450px) {
  47.   #page {
  48.     /*max-width: 1450px;*/
  49.     max-width: 100%;
  50.     margin: auto;
  51.   }
  52.   .triplet .column {width: 33.3%;}
  53. }
  54.  
  55. /* Box Aspect Ratios */
  56. .box{
  57.   position: relative;
  58.   width: 100%;   /* desired width */
  59. }
  60. .box:before{
  61.   content: "";
  62.   display: block;
  63.   padding-top: 100%;  /* initial ratio of 1:1*/
  64. }
  65. .content{
  66.   position:  absolute;
  67.   top: 0;
  68.   left: 0;
  69.   bottom: 0;
  70.   right: 0;
  71. }
  72. .ratio2_1:before{padding-top: 50%;}
  73. .ratio1_2:before{padding-top: 200%;}
  74. .ratio4_3:before{padding-top: 75%;}
  75. .ratio16_9:before{padding-top: 56.25%;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement