2012-04-23 55 views
-1

我正在用jQuery移動應用程序。在我的登錄屏幕上,我有一個提交按鈕。在這個按鈕上,我想應用這個CSS類。輸入按鈕將不會使用正確的CSS類

input.submit { 
    font-family: Arial, Helvetica, sans-serif; 
    font-size: 14px; 
    color: #ffffff; 
    padding: 8px 20px; 
    background: -moz-linear-gradient(
     top, 
     #007ca5 0%, 
     #8080f5); 
    background: -webkit-gradient(
     linear, left top, left bottom, 
     from(#007ca5), 
     to(#8080f5)); 
    border-radius: 10px; 
    -moz-border-radius: 10px; 
    -webkit-border-radius: 10px; 
    border: 1px solid #ffffff; 
    -moz-box-shadow: 
     0px 1px 6px rgba(0,0,0,0.9), 
     inset 0px 0px 5px rgba(161,142,016,0.6); 
    -webkit-box-shadow: 
     0px 1px 6px rgba(0,0,0,0.9), 
     inset 0px 0px 5px rgba(161,142,016,0.6); 
    text-shadow: 
     0px -1px 3px rgba(255,255,255,0), 
     0px 1px 0px rgba(255,255,255,0); 
} 

而且使用這個類像這樣在我的HTML

<INPUT name=submit value=Inloggen type=submit class="submit"> 

現在我認爲,問題是,我的CSS不夠具體。因爲當我要看看我的Firebug的代碼,我得到這個div

<div class="ui-btn ui-btn-corner-all ui-shadow ui-btn-up-g" data-theme="g" aria-disabled="false"> 
<span class="ui-btn-inner ui-btn-corner-all"> 
<span class="ui-btn-text">Inloggen</span> 
</span> 
<input class="submit ui-btn-hidden" type="submit" value="Inloggen" name="submit" aria-disabled="false"> 
</div> 

所以任何人可以幫助我,我沒有讓我的CSS更具體的說好。

+1

請問CSS工作或沒有?當它工作時,你不需要更具體。 – WolvDev 2012-04-23 07:46:21

+0

究竟是什麼問題? – 2012-04-23 07:49:02

+0

你可以分享你的網頁的在線鏈接..... – Kamal 2012-04-23 07:50:50

回答

2

檢查是否嵌入jQuery的MOBIEL css文件除權後您的自定義樣式表:

<!DOCTYPE html> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
    <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1" /> 
    <meta name="apple-mobile-web-app-status-bar-style" content="black"> 
    <link href="Style/jquery.mobile-1.0.1.css" rel="stylesheet" type="text/css" /> 
    <script src="Scripts/jquery-1.7.1.js" type="text/javascript"></script> 
    <script src="Script/jquery.mobile-1.0.1.js" type="text/javascript"></script> 
    <style type="text/css"> 
     input.submit 
     { 
      font-family: Arial, Helvetica, sans-serif; 
      font-size: 14px; 
      color: #ffffff; 
      padding: 8px 20px; 
      background: -moz-linear-gradient(
     top, 
     #007ca5 0%, 
     #8080f5); 
      background: -webkit-gradient(
     linear, left top, left bottom, 
     from(#007ca5), 
     to(#8080f5)); 
      border-radius: 10px; 
      -moz-border-radius: 10px; 
      -webkit-border-radius: 10px; 
      border: 1px solid #ffffff; 
      -moz-box-shadow: 0px 1px 6px rgba(0,0,0,0.9), inset 0px 0px 5px rgba(161,142,016,0.6); 
      -webkit-box-shadow: 0px 1px 6px rgba(0,0,0,0.9), inset 0px 0px 5px rgba(161,142,016,0.6); 
      text-shadow: 0px -1px 3px rgba(255,255,255,0), 0px 1px 0px rgba(255,255,255,0); 
     } 
    </style> 
    <script type="text/javascript"> 



    </script> 
</head> 
<body> 
    <form> 
    <div data-role="page"> 
     <div data-role="content"> 
      <input name="submit" value="Inloggen" type="submit" class="submit"> 
     </div> 
    </div> 
    </form> 
</body> 
</html> 
相關問題