JQuery UI Dialog的樣式設定問題

來源:互聯網
上載者:User

最近在用一個JQUERY UI Dialog的外掛程式,感覺特彆強大,但樣式設定比較麻煩,研究了倆天終於搞定了。

 

運行外掛程式,需要的環境如下

 <script src="../../JS/jquery-1.4.2.js" type="text/javascript"></script>

   <script src="../JS/jquery.ui.js" type="text/javascript"></script>

   <link href="CSS/themes/redmond/jquery.ui.all.css" rel="stylesheet" type="text/css" />

 

jquery.ui.all.css 為啟動樣式的CSS ,用firefox開啟查看 ,浮層的title 如下,

<span id="ui-dialog-title-divShow" class="ui-dialog-title" unselectable="on" style="-moz-user-select:
none;">百姓一站通提示</span>

其實就是一個span,那麼 根據這個class ui-dialog-title  我們去 官網的CSS目錄裡 找到jquery.ui.dialog.css 檔案 尋找classui-dialog-title  這個CSS樣式。

 

.ui-dialog .ui-dialog-title { font: 62.5% "Trebuchet MS" , sans-serif;font-weight:bold;float: left; margin: .1em 16px .1em 0; height:15px }

 

對這個css進行修改即可達到我們想要的浮層的頭樣式了。

 

header的背景設定:

.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }

可以去掉背景圖片 設定為背景顏色

.ui-widget-header { border: 1px solid #aaaaaa; background-color:red; color: #222222; font-weight: bold; }

 

關於x與右下角的表徵圖設定:

表徵圖.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.