2011-08-11 50 views

回答

1

我不知道,如果jQuery是要往下走的路線,但也許這將有助於:

<head> 
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script> 
</head> 
<body> 
    <select id="dropdown"> 
     <option>kiko</option> 
     <option>atletico</option> 
    </select> 

    <script> 
    jQuery(document).ready(function($){ 
     $("#dropdown").click(function(event) { 
     event.preventDefault(); 
     }); 
    }); 
    </script> 
1

這似乎是在Safari 5.1中的錯誤。每個使用CSS @ font-face的SELECT都會因頁面重新加載而失敗。

+0

同樣的事情發生在我的經歷中 –

2

您可以通過CSS針對Safari和避免問題:

@media screen and (-webkit-min-device-pixel-ratio:0) { 

/* for Safari 5.1 bug http://stackoverflow.com/questions/7025826/google-fonts-safari-select-problem */ 

.formData SELECT { 

    font-family:Helvetica, arial, sans-serif; 
} 

} 
0

最好是用戶<ul></ul><ol></ol>並應用必要的CSS和JavaScript insted的這種類型的特殊情況,我們必須申請使用<select></select>的不同的字體家族,字體樣式等。