2010-11-22 86 views
0

如果运行这个简单的Xul示例,可以看到当您从最后一个(3°)按钮滚动到第一个时,使用选项卡,中间按钮消失。任何想法为什么?以及如何解决?Xul Scrollbox按钮消失

(运行它,你会需要把命名为 “img.png” 在内容文件夹中的PNG图片)

test.xul

<?xml-stylesheet href="chrome://test/content/test.css" type="text/css"?> 

<window id="desktop" title="test" width="1280" height="720" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 

    <scrollbox> 
     <button image="chrome://test/content/img.png" /> 
     <button image="chrome://test/content/img.png" /> 
     <button image="chrome://test/content/img.png" /> 
    </scrollbox> 

</window> 

test.css

#desktop { 
    border-style:solid; 
    border-color:transparent; 
    border-width:50px; 
} 

button { 
    position: absolute; 
    -moz-appearance: none; 
    border: none; 
    background: url(""); /* nothing */ 
    width: 128px; 
    height: 128px; 
    z-index: 1; 
} 

button image { 
    width: 64px; 
    height: 64px; 
} 

button:focus image { 
    width: 128px; 
    height: 128px; 
} 

scrollbox { 
    background-color: #555555; 
} 

回答

0

解决插入将盒子中的滚动框放入盒子中,并将滚动的背景色设置为盒子。