lesson.css 11 KB

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