contextmenu.css 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /*
  2. Context Menu Plugin
  3. Design for Semantic UI and use with .ui.contextmenu
  4. Example Usage:
  5. <div id="contextmenu" class="aroz contextmenu" style="font-family: &quot;Microsoft JhengHei&quot;, &quot;SimHei&quot;, &quot;Apple LiGothic Medium&quot;, &quot;STHeiti&quot;; left: 497px; top: 248px;"><div class="item submenu" onclick="newitemmenu(this,event);" payload="">
  6. New Item
  7. <span class="description">
  8. <i class="caret right icon"></i>
  9. </span>
  10. </div>
  11. <div class="item" onclick="" payload="">
  12. Refresh
  13. <span class="description">
  14. <i class="refresh icon"></i>
  15. </span>
  16. </div>
  17. <div class="item" onclick="" payload="">
  18. Open File Manager
  19. </div>
  20. <div class="item" onclick="" payload="">
  21. Personalization
  22. <span class="description">
  23. <i class="paint brush icon"></i>
  24. </span>
  25. </div>
  26. <div class="item submenu" onclick="" payload="">
  27. Wallpaper
  28. <span class="description">
  29. <i class="caret right icon"></i>
  30. </span>
  31. </div>
  32. <div class="item submenu" onclick="" payload="">
  33. Icon Size
  34. <span class="description">
  35. <i class="caret right icon"></i>
  36. </span>
  37. </div>
  38. <div class="item" onclick="" payload="">
  39. Full Screen
  40. <span class="description">
  41. <i class="maximize icon"></i>
  42. </span>
  43. </div>
  44. <div class="item" onclick="" payload="">
  45. Logout
  46. </div>
  47. </div>
  48. */
  49. .aroz.contextmenu{
  50. position: fixed;
  51. box-sizing: border-box;
  52. letter-spacing: -.02em;
  53. z-index: 3000;
  54. }
  55. .aroz.contextmenu .item{
  56. padding: 0.6em 1em !important;
  57. }
  58. .aroz.contextmenu .item:hover{
  59. background: rgb(247, 247, 247);
  60. }
  61. .aroz.contextmenu.visible, .ui.contextmenu.hidden.animating {
  62. display: block;
  63. }
  64. .aroz.contextmenu .divider{
  65. margin-top: 0;
  66. margin-bottom: 0;
  67. }
  68. .aroz.contextmenu{
  69. cursor: auto;
  70. outline: none;
  71. min-width: 150px;
  72. transform: translateZ(0px);
  73. margin: 0em;
  74. padding: 0em 0em;
  75. background: #fff;
  76. font-size: 1em;
  77. text-align: left;
  78. box-shadow: 0px 2px 3px 0px rgba(160,160,160,0.65);
  79. border: 1px solid #d9d9d9;
  80. border-radius: .28571rem;
  81. z-index: 9;
  82. will-change: transform, opacity;
  83. }
  84. .aroz.contextmenu > .item.item.item.item.item.item {
  85. position: relative;
  86. cursor: pointer;
  87. display: flex;
  88. border: none;
  89. height: auto;
  90. width: auto;
  91. text-align: left;
  92. border-top: none;
  93. line-height: 1em;
  94. font-size: 1rem;
  95. color: #5a5a5a;
  96. padding: .78571rem 1.14286rem !important;
  97. text-transform: none;
  98. font-weight: normal;
  99. box-shadow: none;
  100. border-radius: 0;
  101. margin-left: 0 !important;
  102. margin-right: 0 !important;
  103. -webkit-touch-callout: none;
  104. }
  105. .aroz.contextmenu > .item.item.item.item.item.item > i{
  106. font-size: 90%;
  107. }
  108. .aroz.contextmenu.visible > .item.item:hover {
  109. background: #fbfbfb !important;
  110. color: #5a5a5a !important;
  111. z-index: 11;
  112. }
  113. .aroz.contextmenu > *{
  114. white-space: nowrap;
  115. }
  116. .aroz.contextmenu > .item{
  117. user-select: none;
  118. }
  119. .aroz.contextmenu > .item > .description {
  120. margin: 0em 0em 0em 1em;
  121. flex: 1;
  122. text-align: right;
  123. color: #bfbfbf;
  124. }
  125. .aroz.contextmenu .header{
  126. padding: 0.4em;
  127. background-color: rgba(30,30,30,0.05);
  128. }