DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> XML學習教程 >> XML詳解 >> XUL+CSS做彈出菜單
XUL+CSS做彈出菜單
編輯:XML詳解     

 很多軟件都用這種效果,右邊是效果圖,使用的時候很簡單,給<popup>標簽加上CSS定義就可以了,如紅色部分所示

XUL+CSS做彈出菜單

  菜單我挑了一個代碼少的,效果一樣哈

<popup id="emailAddressPopup" popupanchor="bottomleft" onpopupshowing="goUpdateCommand('cmd_createFilterFromPopup');" class="popMunu">
  <menuitem label="&SendMailTo.label;" accesskey="&SendMailTo.Accesskey;" oncommand="SendMailToNode(document.popupNode)"/>
  <menuitem label="&CreateFilterFrom.label;" accesskey="&CreateFilterFrom.Accesskey;" command="cmd_createFilterFromPopup"/>
  <menuitem label="&AddToAddressBook.label;" accesskey="&AddToAddressBook.Accesskey;" oncommand="AddNodeToAddressBook(document.popupNode)"/>
  <menuitem label="&CopyEmailAddress.label;" accesskey="&CopyEmailAddress.Accesskey;" oncommand="CopyEmailAddress(document.popupNode)"/>
</popup>

  下面是CSS文件部分,其中popmune_left.png是藍色的漸變圖

.popMunu{
  border: 1px solid #A0A0A0;
  background-color: #FAFAFA;
  padding: 0 2px 0 26px;;
  margin: 0;
  color: Black;
  line-height: 1.5em;
  background-image: url(images/popmune_left.png);
  background-repeat: repeat-y;
}
.popMunu menuitem{
  margin:1px 0;
  padding: 2px 0;
}
.popMunu menuitem:hover{
  background-color: #D5DFF1;
  color: Black;
}


XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved