3

测试 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}
4

0 回答 0