使用border-radius和插入框阴影时为什么背景颜色会出血/泄漏?

时间:2014-08-02 23:29:04

标签: css background-color css3

所有浏览器都会出现此问题。 Mac或Windows,PC或移动设备。有一个CSS渲染引擎专家回答这个问题会很好,因为它看起来不像是一个真正的错误而是渲染问题。

HTML

<a>&nbsp;</a>

CSS

/* just for style */
body {
  background-color: black;
  text-align: center;
}

a {
  /* using the next 3 rules together triggers the leak/bleed problem */
  border-radius: 20px;
  box-shadow: inset 0 0 0 15px black;
  background-color: white;
  /* just for style */
  display: inline-block;
  padding: 5em;
}

CodePen演示:http://codepen.io/nunoarruda/pen/cbCxH

enter image description here

0 个答案:

没有答案
相关问题