Advertisement
Guest User

animation

a guest
Nov 14th, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.80 KB | None | 0 0
  1. .lets-talk {
  2. background: #fafafa;
  3. height: 300px;
  4. position: relative;
  5. z-index: 2;
  6. margin-top: 115px;
  7.  
  8. @media (max-width: 768px) and (orientation: landscape) {
  9. height: 527px;
  10. }
  11.  
  12. @media (min-width: 600px) and (max-width: 768px) {
  13. height: 527px;
  14. margin-top: 200px;
  15. }
  16.  
  17. @media (min-width: $lg) {
  18. margin-top: 190px;
  19. height: 527px;
  20. }
  21.  
  22. .border-content {
  23. position: relative;
  24. border: 2px solid $color-main;
  25. border-top: none;
  26. border-right: none;
  27. height: 150px;
  28. width: 100%;
  29. overflow-y: visible;
  30. padding: 20px;
  31.  
  32. @media (max-width: 768px) and (orientation: landscape) {
  33. width: 450px;
  34. height: 350px;
  35. padding: 30px;
  36. }
  37.  
  38. @media (min-width: 600px) and (max-width: 768px) {
  39. width: 450px;
  40. height: 350px;
  41. padding: 30px;
  42. }
  43.  
  44. @media (min-width: $lg) {
  45. border: none;
  46.  
  47. &::before {
  48. content: ' ';
  49. border: 1px solid $color-main;
  50. position: absolute;
  51. width: 0;
  52. height: 0;
  53. top: 0;
  54. left: -2px;
  55. -webkit-transition: height 0.5s ease-in-out 0.5s;
  56. -moz-transition: height 0.5s ease-in-out 0.5s;
  57. -ms-transition: height 0.5s ease-in-out 0.5s;
  58. -o-transition: height 0.5s ease-in-out 0.5s;
  59. transition: height 0.5s ease-in-out 0.5s;
  60. }
  61.  
  62. &::after {
  63. content: ' ';
  64. border: 1px solid $color-main;
  65. position: absolute;
  66. width: 0;
  67. height: 0;
  68. bottom: -2px;
  69. left: -2px;
  70. -webkit-transition: width 0.5s ease-in-out 1s;
  71. -moz-transition: width 0.5s ease-in-out 1s;
  72. -ms-transition: width 0.5s ease-in-out 1s;
  73. -o-transition: width 0.5s ease-in-out 1s;
  74. transition: width 0.5s ease-in-out 1s;
  75. }
  76.  
  77. &.shown {
  78. &::before {
  79. height: 100%;
  80. }
  81.  
  82. &::after {
  83. width: 86%;
  84. }
  85. }
  86. }
  87.  
  88. @media (min-width: $xl) {
  89. border: none;
  90.  
  91. &::before {
  92. content: ' ';
  93. border: 1px solid $color-main;
  94. position: absolute;
  95. width: 0;
  96. height: 0;
  97. top: 43px;
  98. left: -2px;
  99. -webkit-transition: height 0.5s ease-in-out 0.5s;
  100. -moz-transition: height 0.5s ease-in-out 0.5s;
  101. -ms-transition: height 0.5s ease-in-out 0.5s;
  102. -o-transition: height 0.5s ease-in-out 0.5s;
  103. transition: height 0.5s ease-in-out 0.5s;
  104. }
  105.  
  106. &::after {
  107. content: ' ';
  108. border: 1px solid $color-main;
  109. position: absolute;
  110. width: 0;
  111. height: 0;
  112. bottom: -2px;
  113. left: -2px;
  114. -webkit-transition: width 0.5s ease-in-out 1s;
  115. -moz-transition: width 0.5s ease-in-out 1s;
  116. -ms-transition: width 0.5s ease-in-out 1s;
  117. -o-transition: width 0.5s ease-in-out 1s;
  118. transition: width 0.5s ease-in-out 1s;
  119. }
  120.  
  121. &.shown {
  122. &::before {
  123. height: 86%;
  124. }
  125.  
  126. &::after {
  127. width: 86%;
  128. }
  129. }
  130. }
  131.  
  132. @media (min-width: $xl) {
  133. width: 450px;
  134. height: 300px;
  135. padding: 30px;
  136. }
  137.  
  138. .overflow-image {
  139. position: absolute;
  140. bottom: 30px;
  141. height: 40vh;
  142. width: 80%;
  143. -webkit-background-size: cover;
  144. background-size: cover;
  145. background-position: center;
  146. background-repeat: no-repeat;
  147.  
  148. @media (max-width: 768px) and (orientation: landscape) {
  149. height: 120vh;
  150. }
  151.  
  152. @media (min-width: $lg) {
  153. display: block;
  154. height: 50vh;
  155.  
  156. &::before {
  157. content: ' ';
  158. position: absolute;
  159. display: block;
  160. height: 100%;
  161. width: 100%;
  162. max-width: 100%;
  163. background-color: #fafafa;
  164. }
  165.  
  166. &::after {
  167. content: ' ';
  168. position: absolute;
  169. display: block;
  170. height: 100%;
  171. width: 100%;
  172. z-index: 999;
  173. max-width: 0;
  174. background-color: #fff;
  175. }
  176.  
  177. &.shown {
  178. &::before {
  179. -webkit-animation: fade-reverse-global;
  180. -o-animation: fade-reverse-global;
  181. animation: fade-reverse-global;
  182. animation-duration: 1.3s;
  183. animation-fill-mode: forwards;
  184. }
  185.  
  186. &::after {
  187. -webkit-animation: fade-global;
  188. -o-animation: fade-global;
  189. animation: fade-global;
  190. animation-duration: 1.3s;
  191. }
  192. }
  193. }
  194. }
  195.  
  196. .lets-talk-rotate {
  197. position: absolute;
  198. top: 0;
  199. left: -77px;
  200. font-size: 20px;
  201. color: $color-dark-gray;
  202. padding-left: 15px;
  203. background-color: #fafafa;
  204. -webkit-transform: rotate(-90deg);
  205. -moz-transform: rotate(-90deg);
  206. -ms-transform: rotate(-90deg);
  207. -o-transform: rotate(-90deg);
  208. transform: rotate(-90deg);
  209.  
  210. @media (min-width: $lg) {
  211. top: -90px;
  212. }
  213.  
  214. @media (min-width: $xl) {
  215. top: 0;
  216. left: -77px;
  217. }
  218.  
  219. .color {
  220. color: $color-main;
  221. }
  222. }
  223.  
  224. .box {
  225. background-color: $color-main;
  226. position: absolute;
  227. bottom: -45px;
  228. right: -55px;
  229. font-size: 16px;
  230. color: $white;
  231. padding: 20px;
  232. max-width: 120px;
  233. z-index: 9999;
  234.  
  235. @media (min-width: $lg) {
  236. bottom: -30px;
  237. right: -90px;
  238. font-size: 20px;
  239. max-width: 0;
  240. padding: 0;
  241. height: 200px;
  242. left: unset;
  243. line-height: 28px;
  244. overflow: hidden;
  245. -webkit-transition: all 0.3s ease-in-out 1s;
  246. -moz-transition: all 0.3s ease-in-out 1s;
  247. -ms-transition: all 0.3s ease-in-out 1s;
  248. -o-transition: all 0.3s ease-in-out 1s;
  249. transition: all 0.3s ease-in-out 1s;
  250.  
  251. &.shown {
  252. max-width: 200px;
  253. }
  254. }
  255.  
  256. span {
  257. min-width: 130px;
  258. color: #fff;
  259.  
  260. @media (min-width: $lg) {
  261. display: block;
  262. margin: 45px 30px;
  263. }
  264. }
  265. }
  266.  
  267. .cta-line {
  268. height: 150px;
  269. border-top: 2px solid $color-main;
  270. border-left: 2px solid $color-main;
  271. width: 75px;
  272. position: absolute;
  273. bottom: 0;
  274. left: 100%;
  275. display: block;
  276.  
  277. @media (max-width: 768px) and (orientation: landscape) {
  278. width: 100px;
  279. height: 340px;
  280. right: -100px;
  281. }
  282.  
  283. @media (min-width: $md) {
  284. height: 340px;
  285. }
  286.  
  287. @media (min-width: $lg) {
  288. height: 300px;
  289. max-height: 0;
  290. max-width: 0;
  291. -webkit-transition: max-height 0.5s ease-in-out 1.7s, max-width 0.5s ease-in-out 2.2s;
  292. -moz-transition: max-height 0.5s ease-in-out 1.7s, max-width 0.5s ease-in-out 2.2s;
  293. -ms-transition: max-height 0.5s ease-in-out 1.7s, max-width 0.5s ease-in-out 2.2s;
  294. -o-transition: max-height 0.5s ease-in-out 1.7s, max-width 0.5s ease-in-out 2.2s;
  295. transition: max-height 0.5s ease-in-out 1.7s, max-width 0.5s ease-in-out 2.2s;
  296.  
  297. &.shown {
  298. max-height: 300px;
  299. max-width: 75px;
  300. }
  301. }
  302.  
  303. @media (min-width: $xl) {
  304. width: 150px;
  305. //right: -150px;
  306.  
  307. &.shown {
  308. max-width: 150px;
  309. }
  310. }
  311. }
  312.  
  313. .cta-lets-talk {
  314. position: absolute;
  315. right: -60%;
  316. top: -25px;
  317. padding: 5px 10px;
  318. color: $color-dark-gray;
  319. text-decoration: none;
  320. background-color: #fafafa;
  321. border: 2px solid $color-main;
  322.  
  323. @media (max-width: 768px) and (orientation: landscape) {
  324. right: -30%;
  325. top: -20px;
  326. }
  327.  
  328. @media (min-width: 600px) and (max-width: 768px) {
  329. right: -30%;
  330. top: -15px;
  331. }
  332.  
  333. @media (min-width: $lg) {
  334. top: -160px;
  335. right: -50%;
  336.  
  337. &::before {
  338. content: ' ';
  339. position: absolute;
  340. display: block;
  341. height: 120%;
  342. width: 120%;
  343. z-index: 99;
  344. left: -5px;
  345. top: -5px;
  346. max-width: 120%;
  347. background-color: #fafafa;
  348. }
  349.  
  350. &::after {
  351. content: ' ';
  352. position: absolute;
  353. display: block;
  354. height: 120%;
  355. width: 120%;
  356. left: -5px;
  357. right: -5px;
  358. top: -5px;
  359. z-index: 999;
  360. max-width: 0;
  361. background-color: $color-main;
  362. }
  363.  
  364. &.shown {
  365. &::before {
  366. -webkit-animation: fade-button-reverse-global;
  367. -o-animation: fade-button-reverse-global;
  368. animation: fade-button-reverse-global;
  369. animation-duration: 1.3s;
  370. animation-fill-mode: forwards;
  371. animation-delay: 2.8s;
  372. }
  373.  
  374. &::after {
  375. -webkit-animation: fade-button-global;
  376. -o-animation: fade-button-global;
  377. animation: fade-button-global;
  378. animation-duration: 0.7s;
  379. animation-delay: 2.5s;
  380. }
  381. }
  382. }
  383.  
  384. @media (min-width: $xl) {
  385. font-size: 16px;
  386. padding: 10px 20px;
  387. top: -25px;
  388. }
  389.  
  390. .lets-talk-arrow {
  391. margin-left: 40px;
  392. display: none;
  393.  
  394. @media (min-width: $xl) {
  395. display: inline-block;
  396. }
  397. }
  398.  
  399. .lets-talk-arrow-hover {
  400. margin-left: 40px;
  401. display: none;
  402. }
  403.  
  404. &.show::before {
  405. border-top-color: $color-main;
  406. border-right-color: $color-main;
  407. }
  408.  
  409. &.show::after {
  410. border-bottom-color: $color-main;
  411. border-left-color: $color-main;
  412. }
  413.  
  414. &:hover {
  415. background-color: $color-main;
  416. color: $color-white;
  417.  
  418. .lets-talk-arrow {
  419. margin-left: 40px;
  420. display: none;
  421. }
  422.  
  423. .lets-talk-arrow-hover {
  424. margin-left: 40px;
  425. display: none;
  426.  
  427. @media (min-width: $xl) {
  428. display: inline-block;
  429. }
  430. }
  431. }
  432. }
  433. }
  434.  
  435.  
  436.  
  437. @keyframes fade-global {
  438. 0% {
  439. max-width: 0;
  440. left: 0;
  441. }
  442.  
  443. 45% {
  444. max-width: 100%;
  445. left: 0;
  446. }
  447.  
  448. 55% {
  449. max-width: 120%;
  450. right: 0;
  451. }
  452.  
  453. 100% {
  454. max-width: 0;
  455. right: 0;
  456. }
  457. }
  458.  
  459. @keyframes fade-reverse-global {
  460. 0% {
  461. max-width: 100%;
  462. right: 0;
  463. }
  464.  
  465. 100% {
  466. max-width: 0;
  467. right: 0;
  468. }
  469. }
  470.  
  471. @keyframes fade-button-global {
  472. 0% {
  473. max-width: 0;
  474. left: -5px;
  475. top: -5px;
  476. }
  477.  
  478. 49% {
  479. max-width: 100%;
  480. left: -5px;
  481. top: -5px;
  482. }
  483.  
  484. 50% {
  485. max-width: 100%;
  486. right: -5px;
  487. left: unset;
  488. top: -5px;
  489. }
  490.  
  491. 100% {
  492. max-width: 0;
  493. right: -5px;
  494. left: unset;
  495. top: -5px;
  496. }
  497. }
  498.  
  499. @keyframes fade-button-reverse-global {
  500. 0% {
  501. max-width: 120%;
  502. right: -5px;
  503. left: -5px;
  504. top: -5px;
  505. }
  506.  
  507. 100% {
  508. max-width: 0;
  509. right: -5px;
  510. left: -5px;
  511. top: -5px;
  512. }
  513. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement