IE中的Box-shadow呈现透明线条/边框

时间:2017-10-10 07:17:58

标签: html5 css3 internet-explorer internet-explorer-11 box-shadow

我尝试在HTML中创建一个tile组件,允许将图像和文本显示为:

IE rendering

如您所见,有两行仅在IE中可见。我删除了轮廓和任何边框,但仍然没有改变任何东西。

你有什么想法如何解决这个问题?



 .tiles-container{
  max-width: 350px;
 }
 
 .tile-banner{
   position: relative;
 }
 
 
 .tiles-container .tile-banner .tile-webcontrol-container {
    height: 200px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.tiles-container .tile-title-container {
    font-family: Arial;
    font-size: 16px;
    position: absolute;
    display: inline;
    margin-left: 20px;
    bottom: 16px;
    margin-right: 60px;
}

.tiles-container .tile-title-container .tile-title {
    background-color: #fff;
    color: #243e7b;
    padding-top: 4.85px;
    padding-bottom: 5px;
    -webkit-box-shadow: 10px 0 0 #fff, -10px 0 0 #fff;
    -moz-box-shadow: 10px 0 0 #fff, -10px 0 0 #fff;
    box-shadow: 10px 0 0 #fff, -10px 0 0 #fff;
    box-decoration-break: clone;
    line-height: 1.55em;
}

<div class="tiles-container">
<div class="tile-banner">
  <div class="tile-webcontrol-container" id="6878d5d7-31df-4ab4-9019-bdf129eff4c4" style="background-position: center; background-image: url('//c1.staticflickr.com/4/3956/15495749937_b4ee958d86_h.jpg'); background-size: cover;">
    <div class="ris-container"></div>
  </div>
  <div class="tile-title-container">
    <span class="tile-title">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. bla bla</span>
  </div>
</div>
</div>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:1)

display:block

中添加inline-blockspan

CSS:

  .tiles-container .tile-title-container .tile-title {
     background-color: #fff;
     color: #243e7b;
     padding-top: 4.85px;
     padding-bottom: 5px;
     -webkit-box-shadow: 10px 0 0 #fff, -10px 0 0 #fff;
     -moz-box-shadow: 10px 0 0 #fff, -10px 0 0 #fff;
     box-shadow: 10px 0 0 #fff, -10px 0 0 #fff;
     box-decoration-break: clone;
     line-height: 1.55em;
     display: block;
   }

演示:http://jsfiddle.net/lotusgodkk/GCu2D/2159/