Advertisement
Guest User

Untitled

a guest
Mar 1st, 2020
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.51 KB | None | 0 0
  1. <style>
  2. /*--------------------------------------------------------------*/
  3. /*-------Masonry Filterable Portfolio Layout by Divi Soup-------*/
  4. /*--------------------------------------------------------------*/
  5.  
  6.  
  7. /*Hide items until all loaded*/
  8.  
  9. .ds-masonry-portfolio .et_pb_portfolio_item {
  10.  display: none;
  11. }
  12.  
  13.  
  14. /*Set the number of columns*/
  15.  
  16. .ds-masonry-portfolio .et_pb_portfolio_items {
  17.  -webkit-columns: 20em; /*increase em values for less columns, decrease for more columns*/
  18.  columns: 20em; /*increase em values for less columns, decrease for more columns*/
  19.  -webkit-column-gap: 10px; /*space between columns*/
  20.  column-gap: 10px; /*space between columns*/
  21.  width: 100%;
  22.  margin-bottom: 30px;
  23. }
  24.  
  25.  
  26. /*Size the items and add spacing*/
  27.  
  28. .ds-masonry-portfolio .et_pb_portfolio_item {
  29.  width: 100%;
  30.  margin: 0;
  31.  border-bottom: 10px solid transparent; /*space between images (should be same value as space between columns)*/
  32.  overflow: hidden;
  33.  -webkit-column-break-inside: avoid;
  34.  break-inside: avoid-column;
  35. }
  36.  
  37.  
  38. /*Remove title spacing*/
  39.  
  40. .ds-masonry-portfolio .et_pb_portfolio_item h2 {
  41.  margin-top: 0;
  42.  padding-bottom: 0;
  43. }
  44.  
  45.  
  46. /*Style the title and caption hover effect*/
  47.  
  48. .ds-masonry-portfolio .ds-portfolio-text {
  49.  position: absolute;
  50.  top: 0;
  51.  width: 100%;
  52.  height: 100%;
  53.  padding: 20px; /*padding around title and category*/
  54.  background: rgba(255, 255, 255, .8); /*overlay colour on hover*/
  55.  opacity: 0;
  56.  display: -webkit-box;
  57.  display: -ms-flexbox;
  58.  display: flex;
  59.  -webkit-box-orient: vertical;
  60.  -webkit-box-direction: normal;
  61.  -ms-flex-direction: column;
  62.  flex-direction: column;
  63.  -webkit-box-pack: center;
  64.  -ms-flex-pack: center;
  65.  justify-content: center;
  66.  -webkit-transition: all .3s ease;
  67.  transition: all .3s ease;
  68. }
  69.  
  70.  
  71. /*Activate hover effect*/
  72. .ds-masonry-portfolio
  73. .et_pb_portfolio_item:hover .ds-portfolio-text {
  74.  opacity: 1;
  75. }
  76.  
  77.  
  78. /*Space the filters*/
  79.  
  80. .ds-masonry-portfolio .et_pb_portfolio_filters ul {
  81.  display: -webkit-box;
  82.  display: -ms-flexbox;
  83.  display: flex;
  84.  -webkit-box-pack: justify;
  85.  -ms-flex-pack: justify;
  86.  justify-content: space-between;
  87.  -ms-flex-wrap: wrap;
  88.  flex-wrap: wrap;
  89.  width: 100%;
  90. }
  91.  
  92. .ds-masonry-portfolio .et_pb_portfolio_filters li {
  93.  min-width: 20%; /*adjust percentage based on number of filters*/
  94.  text-align: center;
  95. }
  96.  
  97.  
  98. /*--------------------------------------------------------------*/
  99. /*-----End Masonry Filterable Portfolio Layout by Divi Soup-----*/
  100. /*--------------------------------------------------------------*/
  101. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement