lesson.css 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. body {
  2. margin: 0;
  3. font-family: Georgia, serif;
  4. font-size: 19px;
  5. line-height: 150%;
  6. }
  7. p + p {
  8. margin-top: 1.5em;
  9. }
  10. li > p {
  11. width: calc(100% - 2em);
  12. }
  13. table {
  14. margin-top: 1em;
  15. margin-bottom: 1em;
  16. }
  17. pre.prettyprint {
  18. margin-top: 2em !important;
  19. margin-bottom: 2em !important;
  20. }
  21. pre.prettyprint li {
  22. white-space: pre;
  23. }
  24. div[data-diagram] {
  25. height: 100%;
  26. }
  27. .spread {
  28. display: flex;
  29. text-align: center;
  30. margin: 2em auto 3em;
  31. }
  32. .spread div[data-diagram] {
  33. height: 150px;
  34. }
  35. .spread>div {
  36. flex: 1 1 auto;
  37. }
  38. .spread .code {
  39. font-family: monospace;
  40. }
  41. .spread .code>div {
  42. text-align: left;
  43. }
  44. #c {
  45. position: absolute;
  46. top: 0;
  47. left: 0;
  48. width: 100vw;
  49. height: 100vh;
  50. z-index: -100;
  51. }
  52. .border {
  53. border: 1px solid black;
  54. }
  55. .threejs_navbar>div,
  56. .lesson-title,
  57. .lesson-comments,
  58. .lesson-comment-sep,
  59. .lesson-main>* {
  60. margin: 0 auto 1em;
  61. max-width: 700px;
  62. width: calc(100% - 40px);
  63. }
  64. .lesson-main>.threejs_example_container {
  65. max-width: 90%;
  66. }
  67. .threejs_example {
  68. width: 100%;
  69. height: 500px;
  70. }
  71. .threejs_header {
  72. background-image: url(/threejs/lessons/resources/banner-00.jpg);
  73. background-size: cover;
  74. background-position: center, center;
  75. padding: 1em;
  76. text-align: center;
  77. }
  78. .threejs_header h1 {
  79. font-size: 5vw;
  80. margin: 0;
  81. background-image: url(/threejs/lessons/resources/logo.png);
  82. background-size: contain;
  83. background-position: center center;
  84. background-repeat: no-repeat;
  85. font-weight: bold;
  86. color: black;
  87. /*
  88. text-shadow: 0px 0px 15px #fff,
  89. 0px 0px 5px #fff,
  90. 0px 0px 10px #fff;
  91. */
  92. }
  93. .threejs_header a {
  94. color: rgba(0, 0, 0, 0);
  95. text-decoration: none;
  96. }
  97. .threejs_navbar {
  98. background: black;
  99. color: white;
  100. }
  101. .threejs_navbar a {
  102. color: white;
  103. }
  104. .threejs_navbar>div {
  105. margin: 0 auto;
  106. display: flex;
  107. justify-content: space-between;
  108. align-items: center;
  109. }
  110. .threejs_navbar>div>* {
  111. display: block;
  112. margin: .25em 0;
  113. }
  114. .threejs_navbar select {
  115. background: #444;
  116. border: none;
  117. font-size: large;
  118. color: white;
  119. }
  120. .home-lang select {
  121. font-size: large;
  122. }
  123. .checkerboard {
  124. background-color: #404040;
  125. background-image:
  126. linear-gradient(45deg, #808080 25%, transparent 25%),
  127. linear-gradient(-45deg, #808080 25%, transparent 25%),
  128. linear-gradient(45deg, transparent 75%, #808080 75%),
  129. linear-gradient(-45deg, transparent 75%, #808080 75%);
  130. background-size: 20px 20px;
  131. background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  132. }
  133. .fullscreen {
  134. position: fixed !important;
  135. left: 0;
  136. top: 0;
  137. width: 100vw !important;
  138. height: 100vh !important;
  139. z-index: 100;
  140. }
  141. .lesson-main>blockquote {
  142. background-color: #DEF;
  143. padding: 1em;
  144. }
  145. .lesson-title {
  146. margin-top: 3em;
  147. margin-bottom: 2em;
  148. }
  149. .lesson-main {
  150. gbackground-color: #ffe;
  151. }
  152. .lesson-sidebar {
  153. font-size: small;
  154. columns: 220px;
  155. padding: 1em;
  156. column-rule: dashed 1px #CCC;
  157. background: #eee;
  158. margin-bottom: 1em;
  159. }
  160. .lesson-sidebar>ul>li {
  161. line-height: 1.3em;
  162. }
  163. .lesson-sidebar ul {
  164. line-height: 1.3em;
  165. margin-bottom: 1em;
  166. }
  167. .lesson-sidebar ul {
  168. list-style-type: none;
  169. padding-left: 1em;
  170. text-indent: -1em;
  171. }
  172. h1, h2, h3, h4 {
  173. font-family: sans-serif;
  174. line-height: 1.2;
  175. }
  176. h3 {
  177. font-size: medium;
  178. }
  179. code {
  180. color: black;
  181. font-family: monospace;
  182. background-color: #ddd;
  183. padding: 0.1em 0.2em 0.1em 0.2em;
  184. border-radius: 0.5em;
  185. white-space: nowrap;
  186. }
  187. .threejs_table_div_center {
  188. text-align: center;
  189. }
  190. .threejs_table_center {
  191. margin-left: auto;
  192. margin-right: auto;
  193. }
  194. .threejs_center {
  195. margin-left: auto;
  196. margin-top: 1em;
  197. margin-bottom: 1em;
  198. margin-right: auto;
  199. display: block;
  200. text-align: center;
  201. max-width: 95%;
  202. }
  203. .threejs_image>img {
  204. width: 100%;
  205. display: block;
  206. }
  207. .threejs_math {
  208. margin-left: auto;
  209. margin-right: auto;
  210. display: inline-block;
  211. text-align: left;
  212. }
  213. .threejs_math_center {
  214. display: block;
  215. text-align: center;
  216. }
  217. .hcenter {
  218. display: -webkit-box;
  219. -webkit-box-orient: horizontal;
  220. -webkit-box-pack: center;
  221. -webkit-box-align: center;
  222. display: -moz-box;
  223. -moz-box-orient: horizontal;
  224. -moz-box-pack: center;
  225. -moz-box-align: center;
  226. display: box;
  227. box-orient: horizontal;
  228. box-pack: center;
  229. box-align: center;
  230. }
  231. table.vertex_table {
  232. border: 1px solid black;
  233. border-collapse: collapse;
  234. font-family: monospace;
  235. font-size: small;
  236. }
  237. table.vertex_table th {
  238. background-color: #88ccff;
  239. padding-right: 1em;
  240. padding-left: 1em;
  241. }
  242. table.vertex_table td {
  243. border: 1px solid black;
  244. text-align: right;
  245. padding-right: 1em;
  246. padding-left: 1em;
  247. }
  248. iframe {
  249. display: block;
  250. }
  251. iframe.body {
  252. height: 100vh;
  253. }
  254. iframe.threejs_example, iframe.threejs_diagram {
  255. border: none;
  256. margin-left: auto;
  257. margin-right: auto;
  258. display: block;
  259. }
  260. iframe.threejs_example {
  261. border: 1px solid black;
  262. }
  263. iframe.noborder {
  264. border: none !important;
  265. }
  266. iframe.external_diagram {
  267. border: none;
  268. margin-left: auto;
  269. margin-right: auto;
  270. display: block;
  271. }
  272. div.threejs_bottombar {
  273. border: 1px solid #000;
  274. background-color: #def;
  275. padding: 1em;
  276. width: calc(100% - 80px);
  277. }
  278. div.threejs_bottombar>h3 {
  279. font-size: x-large;
  280. font-weight: bold;
  281. margin-bottom: 1em;
  282. }
  283. div.threejs_bottombar code {
  284. background-color: #ccc;
  285. }
  286. /* --- Prettify --- */
  287. pre.prettyprint .nocode { background-color: none; color: #FFF }
  288. pre.prettyprint .str { color: #b9ca4a } /* string */
  289. pre.prettyprint .kwd { color: #c397d8 } /* keyword */
  290. pre.prettyprint .com { color: #f3efb2 } /* comment */
  291. pre.prettyprint .typ { color: #7aa6da } /* type */
  292. pre.prettyprint .lit { color: #45e7a6 } /* literal */
  293. pre.prettyprint .pun { color: #7ecce0 } /* punctuation */
  294. pre.prettyprint .pln { color: #eaeaea } /* plaintext */
  295. pre.prettyprint .tag { color: #d54e53 } /* html/xml tag */
  296. pre.prettyprint .atn { color: #e78c45 } /* attribute name */
  297. pre.prettyprint .atv { color: #70c0b1 } /* attribute value */
  298. pre.prettyprint .dec { color: #e78c45 } /* decimal */
  299. pre.prettyprint .var { color: #d54e53 } /* variable name */
  300. pre.prettyprint .fun { color: #7aa6da } /* function name */
  301. pre.prettyprint ul.modifiedlines {
  302. list-style-type: none;
  303. padding-left: 0;
  304. }
  305. pre.prettyprint ul.modifiedlines li.linemodified {
  306. list-style-type: none;
  307. background-color: #324840;
  308. }
  309. pre.prettyprint ul.modifiedlines li.linedeleted {
  310. list-style-type: none;
  311. background-color: #4c1414;
  312. text-decoration: line-through;
  313. }
  314. pre.prettyprint ul.modifiedlines li.lineadded {
  315. list-style-type: none;
  316. background-color: #3f4463;
  317. }
  318. pre.prettyprint, code.prettyprint {
  319. color: #FFF;
  320. background: #222;
  321. border: 1px solid #000;
  322. box-shadow: 10px 10px 0px #ccc;
  323. font-size: 9pt;
  324. font-family: "Lucida Console", Monaco, monospace;
  325. margin: auto;
  326. padding: 1em;
  327. text-align: left; /* override justify on body */
  328. /* this was disabled until 2016-08-26 but I don't know why */
  329. overflow: auto; /* allow scroll bar in case of long lines - goes together with white-space: nowrap! */
  330. white-space: pre; /* was nowrap, prevent line wrapping */
  331. line-height: 1.5em;
  332. width: calc(100% - 80px);
  333. }
  334. @media print {
  335. pre.prettyprint .str, code.prettyprint .str{color:#060}
  336. pre.prettyprint .kwd, code.prettyprint .kwd{color:#006;font-weight:bold}
  337. pre.prettyprint .com, code.prettyprint .com{color:#600;font-style:italic}
  338. pre.prettyprint .typ, code.prettyprint .typ{color:#404;font-weight:bold}
  339. pre.prettyprint .lit, code.prettyprint .lit{color:#044}
  340. pre.prettyprint .pun, code.prettyprint .pun{color:#440}
  341. pre.prettyprint .pln, code.prettyprint .pln{color:#000}
  342. pre.prettyprint .tag, code.prettyprint .tag{color:#006;font-weight:bold}
  343. pre.prettyprint .atn, code.prettyprint .atn{color:#404}
  344. pre.prettyprint .atv, code.prettyprint .atv{color:#060}
  345. pre.prettyprint, code.prettyprint {
  346. color: #000;
  347. background: #EEE;
  348. font-size: 8pt;
  349. font-family: "Lucida Console", Monaco, monospace;
  350. width: 95%;
  351. margin: auto;
  352. padding: 1em;
  353. text-align: left; /* override justify on body */
  354. overflow: visible;
  355. white-space: pre; /* was nowrap, prevent line wrapping */
  356. line-height: 1.5;
  357. }
  358. pre.prettyprint ul.modifiedlines li.linemodified {
  359. list-style-type: none;
  360. background-color: #DDD;
  361. }
  362. pre.prettyprint ul.modifiedlines li.linedeleted {
  363. list-style-type: none;
  364. background-color: #CCC;
  365. text-decoration: line-through;
  366. }
  367. pre.prettyprint ul.modifiedlines li.lineadded {
  368. list-style-type: none;
  369. background-color: #EEE;
  370. }
  371. body {
  372. margin: 10mm;
  373. }
  374. .doubleSpace p {
  375. line-height: 2.5;
  376. font-size: x-large;
  377. }
  378. .doubleSpace pre.prettyprint {
  379. font-size: 14pt;
  380. }
  381. .threejs_navbar,
  382. .lesson-comment-sep,
  383. .lesson-sidebar,
  384. .lesson-comments {
  385. display: none;
  386. }
  387. }
  388. @media (max-width: 720px) {
  389. body {
  390. font-size: 16px;
  391. }
  392. h1 {
  393. font-size: 24px;
  394. }
  395. .threejs_example {
  396. max-height: 400px;
  397. }
  398. iframe {
  399. max-width: 95%;
  400. }
  401. iframe.background {
  402. max-width: 100%;
  403. }
  404. }
粤ICP备19079148号