使用outline-offset和Chrome的奇怪行为

时间:2012-12-16 17:32:30

标签: css google-chrome css3 outline

测试CSS属性outline-offset,我注意到Chrome似乎只在元素的左侧和顶部插入间距(Firefox,Opera和Safari(Windows)所有边缘都有间距,而IE9不支持财产)。有谁知道为什么会这样?

jsFiddle:http://jsfiddle.net/hydrurga/WChhS/

上面jsFiddle的html是:

<p>First paragraph</p>
<p>Here is the <span class="first">first span</span> and the
<span class="second">second span</span> of the paragraph</p>
<p>Another paragraph</p>

风格:

p {background-color:blue; color:red; line-height: 3em}
span.first {outline: 5px solid red}
span.second {outline: 5px solid red; outline-offset: 5px}

0 个答案:

没有答案