juxtapose.css 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. /* juxtapose - v1.2.1 - 2019-04-18
  2. * Copyright (c) 2019 Alex Duner and Northwestern University Knight Lab
  3. */
  4. div.juxtapose {
  5. width: 100%;
  6. font-family: Helvetica, Arial, sans-serif;
  7. }
  8. div.jx-slider {
  9. width: 100%;
  10. height: 100%;
  11. position: relative;
  12. overflow: hidden;
  13. cursor: pointer;
  14. color: #f3f3f3;
  15. }
  16. div.jx-handle {
  17. position: absolute;
  18. height: 100%;
  19. width: 40px;
  20. cursor: col-resize;
  21. z-index: 15;
  22. margin-left: -20px;
  23. }
  24. .vertical div.jx-handle {
  25. height: 40px;
  26. width: 100%;
  27. cursor: row-resize;
  28. margin-top: -20px;
  29. margin-left: 0;
  30. }
  31. div.jx-control {
  32. height: 100%;
  33. margin-right: auto;
  34. margin-left: auto;
  35. width: 3px;
  36. background-color: currentColor;
  37. }
  38. .vertical div.jx-control {
  39. height: 3px;
  40. width: 100%;
  41. background-color: currentColor;
  42. position: relative;
  43. top: 50%;
  44. transform: translateY(-50%);
  45. }
  46. div.jx-controller {
  47. position: absolute;
  48. margin: auto;
  49. top: 0;
  50. bottom: 0;
  51. height: 60px;
  52. width: 9px;
  53. margin-left: -3px;
  54. background-color: currentColor;
  55. }
  56. .vertical div.jx-controller {
  57. height: 9px;
  58. width: 100px;
  59. margin-left: auto;
  60. margin-right: auto;
  61. top: -3px;
  62. position: relative;
  63. }
  64. div.jx-arrow {
  65. position: absolute;
  66. margin: auto;
  67. top: 0;
  68. bottom: 0;
  69. width: 0;
  70. height: 0;
  71. transition: all .2s ease;
  72. }
  73. .vertical div.jx-arrow {
  74. position: absolute;
  75. margin: 0 auto;
  76. left: 0;
  77. right: 0;
  78. width: 0;
  79. height: 0;
  80. transition: all .2s ease;
  81. }
  82. div.jx-arrow.jx-left {
  83. left: 2px;
  84. border-style: solid;
  85. border-width: 8px 8px 8px 0;
  86. border-color: transparent currentColor transparent transparent;
  87. }
  88. div.jx-arrow.jx-right {
  89. right: 2px;
  90. border-style: solid;
  91. border-width: 8px 0 8px 8px;
  92. border-color: transparent transparent transparent currentColor;
  93. }
  94. .vertical div.jx-arrow.jx-left {
  95. left: 0px;
  96. top: 2px;
  97. border-style: solid;
  98. border-width: 0px 8px 8px 8px;
  99. border-color: transparent transparent currentColor transparent;
  100. }
  101. .vertical div.jx-arrow.jx-right {
  102. right: 0px;
  103. top: auto;
  104. bottom: 2px;
  105. border-style: solid;
  106. border-width: 8px 8px 0 8px;
  107. border-color: currentColor transparent transparent transparent;
  108. }
  109. div.jx-handle:hover div.jx-arrow.jx-left,
  110. div.jx-handle:active div.jx-arrow.jx-left {
  111. left: -1px;
  112. }
  113. div.jx-handle:hover div.jx-arrow.jx-right,
  114. div.jx-handle:active div.jx-arrow.jx-right {
  115. right: -1px;
  116. }
  117. .vertical div.jx-handle:hover div.jx-arrow.jx-left,
  118. .vertical div.jx-handle:active div.jx-arrow.jx-left {
  119. left: 0px;
  120. top: 0px;
  121. }
  122. .vertical div.jx-handle:hover div.jx-arrow.jx-right,
  123. .vertical div.jx-handle:active div.jx-arrow.jx-right {
  124. right: 0px;
  125. bottom: 0px;
  126. }
  127. div.jx-image {
  128. position: absolute;
  129. height: 100%;
  130. display: inline-block;
  131. top: 0;
  132. overflow: hidden;
  133. -webkit-backface-visibility: hidden;
  134. }
  135. .vertical div.jx-image {
  136. width: 100%;
  137. left: 0;
  138. top: auto;
  139. }
  140. div.jx-image img {
  141. height: 100%;
  142. width: auto;
  143. z-index: 5;
  144. position: absolute;
  145. margin-bottom: 0;
  146. max-height: none;
  147. max-width: none;
  148. max-height: initial;
  149. max-width: initial;
  150. }
  151. .vertical div.jx-image img {
  152. height: auto;
  153. width: 100%;
  154. }
  155. div.jx-image.jx-left {
  156. left: 0;
  157. background-position: left;
  158. }
  159. div.jx-image.jx-left img {
  160. left: 0;
  161. }
  162. div.jx-image.jx-right {
  163. right: 0;
  164. background-position: right;
  165. }
  166. div.jx-image.jx-right img {
  167. right: 0;
  168. bottom: 0;
  169. }
  170. .veritcal div.jx-image.jx-left {
  171. top: 0;
  172. background-position: top;
  173. }
  174. .veritcal div.jx-image.jx-left img {
  175. top: 0;
  176. }
  177. .vertical div.jx-image.jx-right {
  178. bottom: 0;
  179. background-position: bottom;
  180. }
  181. .veritcal div.jx-image.jx-right img {
  182. bottom: 0;
  183. }
  184. div.jx-image div.jx-label {
  185. font-size: 1em;
  186. padding: .25em .75em;
  187. position: relative;
  188. display: inline-block;
  189. top: 0;
  190. background-color: #000; /* IE 8 */
  191. background-color: rgba(0,0,0,.7);
  192. color: white;
  193. z-index: 10;
  194. white-space: nowrap;
  195. line-height: 18px;
  196. vertical-align: middle;
  197. }
  198. div.jx-image.jx-left div.jx-label {
  199. float: left;
  200. left: 0;
  201. }
  202. div.jx-image.jx-right div.jx-label {
  203. float: right;
  204. right: 0;
  205. }
  206. .vertical div.jx-image div.jx-label {
  207. display: table;
  208. position: absolute;
  209. }
  210. .vertical div.jx-image.jx-right div.jx-label {
  211. left: 0;
  212. bottom: 0;
  213. top: auto;
  214. }
  215. div.jx-credit {
  216. line-height: 1.1;
  217. font-size: 0.75em;
  218. }
  219. div.jx-credit em {
  220. font-weight: bold;
  221. font-style: normal;
  222. }
  223. /* Animation */
  224. div.jx-image.transition {
  225. transition: width .5s ease;
  226. }
  227. div.jx-handle.transition {
  228. transition: left .5s ease;
  229. }
  230. .vertical div.jx-image.transition {
  231. transition: height .5s ease;
  232. }
  233. .vertical div.jx-handle.transition {
  234. transition: top .5s ease;
  235. }
  236. /* Knight Lab Credit */
  237. a.jx-knightlab {
  238. background-color: #000; /* IE 8 */
  239. background-color: rgba(0,0,0,.25);
  240. bottom: 0;
  241. display: table;
  242. height: 14px;
  243. line-height: 14px;
  244. padding: 1px 4px 1px 5px;
  245. position: absolute;
  246. right: 0;
  247. text-decoration: none;
  248. z-index: 10;
  249. }
  250. a.jx-knightlab div.knightlab-logo {
  251. display: inline-block;
  252. vertical-align: middle;
  253. height: 8px;
  254. width: 8px;
  255. background-color: #c34528;
  256. transform: rotate(45deg);
  257. -ms-transform: rotate(45deg);
  258. -webkit-transform: rotate(45deg);
  259. top: -1.25px;
  260. position: relative;
  261. cursor: pointer;
  262. }
  263. a.jx-knightlab:hover {
  264. background-color: #000; /* IE 8 */
  265. background-color: rgba(0,0,0,.35);
  266. }
  267. a.jx-knightlab:hover div.knightlab-logo {
  268. background-color: #ce4d28;
  269. }
  270. a.jx-knightlab span.juxtapose-name {
  271. display: table-cell;
  272. margin: 0;
  273. padding: 0;
  274. font-family: Helvetica, Arial, sans-serif;
  275. font-weight: 300;
  276. color: white;
  277. font-size: 10px;
  278. padding-left: 0.375em;
  279. vertical-align: middle;
  280. line-height: normal;
  281. text-shadow: none;
  282. }
  283. /* keyboard accessibility */
  284. div.jx-controller:focus,
  285. div.jx-image.jx-left div.jx-label:focus,
  286. div.jx-image.jx-right div.jx-label:focus,
  287. a.jx-knightlab:focus {
  288. background: #eae34a;
  289. color: #000;
  290. }
  291. a.jx-knightlab:focus span.juxtapose-name{
  292. color: #000;
  293. border: none;
  294. }