Box-shadow trimmed in CSS columns in Chrome

后端 未结 9 2264
难免孤独
难免孤独 2020-12-15 17:38

I want the block elements inside CSS columns to have box shadow. The following, simplified code renders as expected in IE10 and Firefox 21, but in current C

9条回答
  •  旧巷少年郎
    2020-12-15 18:01

    I think column-count is conflicting with chrome...

    Try This:

    div#column-container {
      /* Set 2 columns*/
      /* insignificant */
      width: 50%;
    }
    
    div#column-container div {
      background-color: yellow;
    
      /* set shadow for yellow elements */
      box-shadow: 0px 0px 15px #000;
      -webkit-box-shadow: 0px 0px 15px #000;
      -moz-box-shadow:    0px 0px 15px #000;
    
      /* Make sure that yellow div is not split between columns */
      display: inline-block;
    
      /* the rest - not significant */
      width: 46%;
      height: 70px;
      margin-top: 0;
      margin-bottom: 20px;
      margin-right: 2%;
      float:left;
    }
    

提交回复
热议问题