2013-02-06 55 views
0

當我將鼠標光標放在FileUpload按鈕上時,會發生以下情況:指針類型僅在按鈕的兩側顯示,但當它位於標籤區域上方時,光標將更改爲類型文字。默認的FileUpload CSS看起來很好,再加上我沒有找到任何有關標籤或類似的風格選項,可能會導致一些摩擦。Primefaces:fileupload光標問題

enter image description here

的FileUpload默認CSS

.fileupload-buttonbar .ui-button input { 
    position: absolute; 
    top: 0; 
    right: 0; 
    margin: 0; 
    border: solid transparent; 
    border-width: 0 0 100px 200px; 
    opacity: 0; 
    filter: alpha(opacity=0); 
    -o-transform: translate(250px, -50px) scale(1); 
    direction: ltr; 
    cursor: pointer; 
    z-index: 5000; 
} 

XHTML

<p:fileUpload style="pointer:cursor !important" 
    fileUploadListener="#{controller.doSomething}" 
    mode="advanced" label="Examinar" 
    auto="true" 
/> 

我試圖重寫CSS,但沒有改變。

注:此行爲僅與(默認光標)和火狐(文本光標)發生。在IE上運行良好。

我讀過關於數據表組件的一些光標問題,但到目前爲止我還沒有能夠擺脫這種奇怪的不便。

對此有何看法?

回答

1

這應該讓你對你的方式使用Chrome:

input[type="file"]::-webkit-file-upload-button { cursor: pointer; } 

關閉我的頭頂,我想回退策略奏效的Firefox?:

input[type="file"] { cursor: pointer; cursor: hand; } 

您可能要標記您的用CSS回答,因爲這是一種瀏覽器樣式「東西」。

+0

謝謝。它現在正在使用Chrome。 Firefox仍然沒有運氣。這似乎是瀏覽器的限制。我在這裏發現了類似的內容:http://code.google.com/p/gwtupload/issues/detail?id=128 – CountD