photoGallery.css 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. html, body, div, span{
  2. margin: 0;
  3. padding: 0;
  4. border: 0;
  5. font: inherit;
  6. font-size: 100%;
  7. vertical-align: baseline;
  8. }
  9. body, html, .box {
  10. height: 100%;
  11. width: 100%;
  12. }
  13. body {
  14. font: 400 16px/24px "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  15. letter-spacing: 0.01em;
  16. cursor: default;
  17. -webkit-user-select: none;
  18. -webkit-font-smoothing: antialiased;
  19. }
  20. .box {
  21. position: relative;
  22. overflow: hidden;
  23. }
  24. header{
  25. position: absolute;
  26. height: 30px;
  27. width: 100%;
  28. }
  29. .winControl {
  30. position: absolute;
  31. right: 0;
  32. top: 0;
  33. z-index: 99999;
  34. }
  35. .winControl span {
  36. display: inline-block;
  37. padding: 4px 6px;
  38. cursor: pointer;
  39. line-height: 10px;
  40. }
  41. .winControl span:hover {
  42. background: #E82B45;
  43. }
  44. [drag] {
  45. -webkit-app-region: drag;
  46. }
  47. [noDrag] {
  48. -webkit-app-region: no-drag;
  49. }
  50. i{
  51. position: relative;
  52. z-index:99999;
  53. display: inline-block;
  54. }
  55. .icon_close-big{
  56. width: 18px;
  57. height: 18px;
  58. background-image: url('icon/close_big.png');
  59. }
  60. .icon_close-small{
  61. width: 13px;
  62. height: 13px;
  63. background-image: url('icon/close_small.png');
  64. display: inline-block;
  65. }
  66. .icon_tool-fullscreen{
  67. width: 18px;
  68. height: 18px;
  69. background-image: url('icon/full_screen.png');
  70. }
  71. .icon_tool-bigger{
  72. width: 20px;
  73. height: 19px;
  74. background-image: url('icon/bigger.png');
  75. }
  76. .icon_tool-smaller{
  77. width: 20px;
  78. height: 19px;
  79. background-image: url('icon/smaller.png');
  80. }
  81. .icon_tool-rotate{
  82. width: 17px;
  83. height: 20px;
  84. background-image: url('icon/rotate.png');
  85. }
  86. .icon_tool-download{
  87. width: 16px;
  88. height: 20px;
  89. background-image: url('icon/close_big.png');
  90. }
  91. .icon_tool-prev{
  92. width: 62px;
  93. height: 72px;
  94. background-image: url('icon/prev.png');
  95. }
  96. .icon_tool-next{
  97. width: 62px;
  98. height: 72px;
  99. background-image: url('icon/next.png');
  100. }
  101. /* 效果 */
  102. .rotate0{
  103. transform: rotate(0deg);
  104. -webkit-transform: rotate(0deg);
  105. }
  106. .rotate90{
  107. transform: rotate(90deg);
  108. -webkit-transform: rotate(90deg);
  109. }
  110. .rotate180{
  111. transform: rotate(180deg);
  112. -webkit-transform: rotate(180deg);
  113. }
  114. .rotate270{
  115. transform: rotate(270deg);
  116. -webkit-transform: rotate(270deg);
  117. }
  118. .gallery{
  119. width: 100%;
  120. height: 100%;
  121. background: rgba(0, 0, 0, 0.3);
  122. }
  123. .gallery .image{
  124. position: absolute;
  125. margin:0; /*之所以不使用auto直接垂直居中,是因为当图片旋转时left值会很难计算*/
  126. padding:0;
  127. z-index: 999;
  128. display: none;
  129. }
  130. .gallery .image.active{
  131. display:block;
  132. }
  133. .gallery .tool{
  134. position: absolute;
  135. bottom: 4px;
  136. width: 100%;
  137. text-align: center;
  138. display: none;
  139. z-index: 99999;
  140. }
  141. .gallery .toolct{
  142. display: inline-block;
  143. height: 30px;
  144. background-color: #6f6965;
  145. padding: 5px 14px;
  146. box-sizing: border-box;
  147. border-radius: 6px;
  148. }
  149. .gallery .toolct span{
  150. margin-right: 20px;
  151. }
  152. .gallery .toolct i{
  153. display: inline-block;
  154. cursor: pointer;
  155. }
  156. .gallery .percentTip{
  157. position: absolute;
  158. top: 0;
  159. bottom: 0;
  160. right: 0;
  161. left: 0;
  162. margin: auto;
  163. width: 100px;
  164. height: 30px;
  165. z-index: 9999;
  166. text-align: center;
  167. line-height: 30px;
  168. font-size: 16px;
  169. border-radius: 8px;
  170. color: #ffffff;
  171. filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr='#4F504E',endColorStr='#151313',gradientType='1');
  172. background: linear-gradient(315deg, #4F504E, #151313);
  173. background: -moz-linear-gradient(315deg, #4F504E, #151313);
  174. background: -o-linear-gradient(left,#4F504E, #151313);
  175. background: -webkit-gradient(linear,100% 0%, 100% 0%, from(#4F504E), to(#151313));
  176. }
  177. .gallery .thumbnails{
  178. position: absolute;
  179. right: 1px;
  180. bottom: 1px;
  181. border: 1px solid #ffffff;
  182. z-index: 99999;
  183. border-radius: 5px;
  184. background-color: rgba(177, 177, 177, 0.5);
  185. display: none;
  186. }
  187. .gallery .thumbnails .thumbDrag{
  188. position: absolute;
  189. top: 0;
  190. bottom: 0;
  191. width: 100px;
  192. height: 100px;
  193. border: 1px solid black;
  194. box-sizing: border-box;
  195. }
  196. .gallery .thumbnails .thumbDrag span{
  197. width:100%;
  198. height:100%;
  199. border: 1px solid white;
  200. display: block;
  201. box-sizing: border-box;
  202. }
  203. .gallery .thumbnails .thumbClose{
  204. position: absolute;
  205. right: 1px;
  206. top: -2px;
  207. cursor: pointer;
  208. height: 13px;
  209. }
  210. .gallery .thumbnails img{
  211. max-width: 100%;
  212. max-height: 100%;
  213. margin: auto;
  214. display: block;
  215. position: absolute;
  216. top: 0;
  217. left: 0;
  218. right: 0;
  219. bottom: 0;
  220. }
  221. .gallery .oper{
  222. position: absolute;
  223. top: 0;
  224. bottom: 0;
  225. right: 0;
  226. left: 0;
  227. margin: auto;
  228. height: 38px;
  229. z-index: 99999;
  230. }
  231. .gallery .oper i{
  232. display: none;
  233. cursor: pointer;
  234. }
  235. .gallery .oper span{
  236. width: 44px;
  237. height: 38px;
  238. }
  239. .gallery .oper .prev{
  240. float:left;
  241. }
  242. .gallery .oper .next{
  243. float:right;
  244. margin-right: 9px;
  245. }
  246. .gallery .oper .prev.active i, .gallery .oper .next.active i{
  247. display: inline-block;
  248. }