Advertisement
Guest User

Untitled

a guest
May 4th, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.97 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <style class="cp-pen-styles">
  6. body { background-color: #171d25; }
  7.  
  8. .container {
  9. position: relative;
  10. -webkit-transition: all 0.3s ease-out;
  11. transition: all 0.3s ease-out;
  12. height: 500px;
  13. -webkit-perspective: 700px;
  14. perspective: 700px;
  15. z-index: 10;
  16. overflow: hidden;
  17. }
  18.  
  19. .container .honeycomb {
  20. display: block;
  21. position: absolute;
  22. margin-left: -465px;
  23. padding-left: 18px;
  24. left: 50%;
  25. text-align: center;
  26. height: 450px;
  27. width: 930px;
  28. -ms-transform: rotateX(45deg) rotateY(0deg);
  29. -webkit-transform: rotateX(45deg) rotateY(0deg);
  30. transform: rotateX(45deg) rotateY(0deg);
  31. -webkit-transform-style: preserve-3d;
  32. transform-style: preserve-3d;
  33. -ms-transform-origin: center 65%;
  34. -webkit-transform-origin: center 65%;
  35. transform-origin: center 65%;
  36. z-index: 5;
  37. }
  38.  
  39. .container .honeycomb .column {
  40. display: block;
  41. float: left;
  42. width: 62px;
  43. }
  44.  
  45. .container .honeycomb .column:nth-child(odd) { margin-top: 36px; }
  46.  
  47. .container .honeycomb .hex {
  48. display: block;
  49. position: relative;
  50. float: left;
  51. margin: 0;
  52. height: 72px;
  53. width: 62px;
  54. color: #fff;
  55. cursor: pointer;
  56. text-decoration: none;
  57. -webkit-transform-style: preserve-3d;
  58. transform-style: preserve-3d;
  59. -webkit-transition: all 0.3s ease-out;
  60. transition: all 0.3s ease-out;
  61. filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);
  62. opacity: 0.5;
  63. }
  64.  
  65. /*Движение кнопки*/
  66. .container .honeycomb .hex:hover {
  67. opacity: 1;
  68. -ms-transform: translateZ(15px);
  69. -webkit-transform: translateZ(15px);
  70. transform: translateZ(15px);
  71. -webkit-transition-duration: 200ms;
  72. transition-duration: 200ms;
  73. }
  74.  
  75. .container .honeycomb .hex .wrapper:active {
  76. opacity: 1;
  77.  
  78. background: #ffffff;
  79. }
  80.  
  81. /*Появление надписи*/
  82. .container .honeycomb .hex:hover .content {
  83. filter: progid:DXImageTransform.Microsoft.Alpha(enabled=false);
  84. opacity: 1;
  85. -ms-transform: rotateX(-90deg) translateZ(-40px) translateY(-50px);
  86. -webkit-transform: rotateX(-90deg) translateZ(-40px) translateY(-50px);
  87. transform: rotateX(-90deg) translateZ(-40px) translateY(-50px);
  88. }
  89.  
  90. .container .honeycomb .hex .wrapper {
  91. display: block;
  92. position: absolute;
  93. top: 0;
  94. left: 0;
  95. height: 100%;
  96. width: 100%;
  97. }
  98.  
  99. .container .honeycomb .hex .wrapper .color-1 { background: #ffbc06; }
  100.  
  101. .container .honeycomb .hex .wrapper .color-1:before { border-right-color: #ffbc06; }
  102.  
  103. .container .honeycomb .hex .wrapper .color-1:after { border-left-color: #ffbc06; }
  104.  
  105. .container .honeycomb .hex .wrapper .color-2
  106. {
  107. background: #ff0000;
  108. }
  109.  
  110. .container .honeycomb .hex .wrapper .color-2:before
  111. {
  112. border-right-color: #ff0000;
  113. }
  114.  
  115. .container .honeycomb .hex .wrapper .color-2:after
  116. {
  117. border-left-color: #ff0000;
  118. }
  119.  
  120. .container .honeycomb .hex .content {
  121. display: block;
  122. position: absolute;
  123. top: 0;
  124. left: -80px;
  125. text-align: center;
  126. width: 200px;
  127. filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
  128. opacity: 0;
  129. -moz-transition: all 0.3s ease-out 0.1s;
  130. -o-transition: all 0.3s ease-out 0.1s;
  131. -webkit-transition: all 0.3s ease-out;
  132. -webkit-transition-delay: 0.1s;
  133. -webkit-transition: all 0.3s ease-out 0.1s;
  134. transition: all 0.3s ease-out 0.1s;
  135. -ms-transform: rotateX(-90deg) translateZ(-40px) translateY(-40px);
  136. -webkit-transform: rotateX(-90deg) translateZ(-40px) translateY(-40px);
  137. transform: rotateX(-90deg) translateZ(-40px) translateY(-40px);
  138. pointer-events: none;
  139. -webkit-font-smoothing: antialiased;
  140. }
  141.  
  142. .container .honeycomb .hex .content strong {
  143. display: block;
  144. font: 600 26px/1.1 verdana, sans-serif;
  145. overflow: hidden;
  146. text-overflow: ellipsis;
  147. white-space: nowrap;
  148. text-shadow: -1px -1px 2px rgba(0, 0, 0, 0.8);
  149. }
  150.  
  151. .container .honeycomb .hex .content small {
  152. display: block;
  153. font: 15px/1.1 verdana, sans-serif;
  154. }
  155.  
  156. .container .honeycomb .shadows {
  157. display: block;
  158. position: absolute;
  159. top: -15%;
  160. left: -15%;
  161. height: 130%;
  162. width: 130%;
  163. background-image: -webkit-radial-gradient(closest-side, rgba(23, 29, 37, 0), #171d25);
  164. background-image: radial-gradient(closest-side, rgba(23, 29, 37, 0), #171d25);
  165. filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=90);
  166. opacity: 0.9;
  167. -ms-transform: translateZ(10px);
  168. -webkit-transform: translateZ(10px);
  169. transform: translateZ(10px);
  170. pointer-events: none;
  171. }
  172.  
  173. .hexagon {
  174. display: block;
  175. position: absolute;
  176. width: 36px;
  177. height: 62px;
  178. background-color: #ffffff;
  179. }
  180.  
  181. .hexagon:before,
  182. .hexagon:after {
  183. content: "";
  184. position: relative;
  185. float: left;
  186. border-top: 31px solid transparent;
  187. border-bottom: 31px solid transparent;
  188. }
  189.  
  190. .hexagon:before {
  191. border-right: 18px solid #ffffff;
  192. left: -18px;
  193. }
  194.  
  195. .hexagon:after {
  196. border-left: 18px solid #ffffff;
  197. right: -18px;
  198. }
  199.  
  200. .hidden { display: none; }
  201. </style>
  202. <div class="container">
  203. <div class="honeycomb">
  204. <div class="hexes-1 column">
  205. <a class="hex">
  206. <div class="wrapper">
  207. <div class="hexagon color-2"></div>
  208. </div>
  209. </a>
  210. <a class="hex">
  211. <div class="wrapper">
  212. <div class="hexagon color-2"></div>
  213. </div>
  214. </a>
  215. <a class="hex">
  216. <div class="wrapper">
  217. <div class="hexagon color-2"></div>
  218. </div>
  219. </a>
  220. </div>
  221. <div class="hexes-2 column">
  222. <a class="hex">
  223. <div class="wrapper">
  224. <div class="hexagon color-2"></div>
  225. </div>
  226. </a>
  227. <a class="hex">
  228. <div class="wrapper">
  229. <div class="hexagon color-1"></div>
  230. </div>
  231.  
  232. <span class="content">
  233. <strong>CSSScript</strong>
  234. <small>i'm a hexagon</small>
  235. </span>
  236. </a>
  237. <a class="hex">
  238. <div class="wrapper">
  239. <div class="hexagon color-2"></div>
  240. </div>
  241. </a>
  242. </div>
  243. </body>
  244. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement