2012-02-21 30 views

Trả lời

9

Thêm -webkit-xuất hiện: none;

.inputtxt { 
    border:0; 
    background:none; 
    -webkit-appearance: none; 
} 

jsFiddle dụ

+3

Có thể giữ biểu tượng thả xuống không? –

+3

Bạn có thể giả mạo nó bằng CSS: http://jsfiddle.net/u8QRS/ – j08691

+0

+1 Yêu giải pháp của bạn. Một số khác http://jsfiddle.net/PbYFT/227/ –

1

Tôi không biết nếu điều này là những gì bạn muốn, nhưng hãy thử:

-webkit-appearance:none; 
+0

Cảm ơn Yavanosta. BTW '-webkit-appearance: none' sẽ loại bỏ biểu tượng thả xuống. –

1

Bạn cần phải phát hiện các trình duyệt sử dụng jQuery

if($.browser.chrome){ 
userAgent = userAgent.substring(userAgent.indexOf('chrome/') +7); 
userAgent = userAgent.substring(0,userAgent.indexOf('.')); 
version = userAgent; 
    // If it is chrome then jQuery thinks it's safari so we have to tell it it isn't 
$.browser.safari = false; 
     } 

Sau đó, bạn có thể áp dụng nhiều thay đổi này trong css của bạn chẳng hạn như nền: none bằng cách xác định nếu nó là chrome hay không.

background-color:#ffffff; 
background-image:-webkit-gradient(linear, left bottom, left top, color-stop(0,    #f4f4f4), color-stop(0.48, #eeeeee), color-stop(0.5, #f6f6f6), color-stop(0.8, #ffffff)); 
background-image:-webkit-linear-gradient(center bottom, #f4f4f4 0%, #eeeeee 48%, #f6f6f6 50%, #ffffff 80%); 
background-image:-moz-linear-gradient(center bottom, #f4f4f4 0%, #eeeeee 48%, #f6f6f6 50%, #ffffff 80%); 
background-image:-o-linear-gradient(top, #f4f4f4 0%, #eeeeee 48%, #f6f6f6 50%, #ffffff 80%); 
background-image:-ms-linear-gradient(top, #f4f4f4 0%, #eeeeee 48%, #f6f6f6 50%, #ffffff 80%); 
background-image:linear-gradient(top, #f4f4f4 0%, #eeeeee 48%, #f6f6f6 50%, #ffffff 80%); 
Các vấn đề liên quan