card-preview.scss 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668
  1. // card-preview
  2. .card-preview {
  3. padding: 10px 0;
  4. background-color: #f0f0f0;
  5. color: #000;
  6. .page-box {
  7. margin: 10px auto;
  8. box-shadow: 0 0 4px #ddd;
  9. }
  10. }
  11. .card-print {
  12. padding: 0;
  13. .page-box {
  14. margin: 0 auto;
  15. box-shadow: none;
  16. page-break-after: always;
  17. }
  18. // 印刷模式:隐藏客观题强调标记
  19. .elem-fill-question-first {
  20. &::before {
  21. display: none;
  22. }
  23. }
  24. .elem-fill-question .option-item,
  25. .elem-fill-number .fill-number-option,
  26. .card-head-body .head-stdno .stdno-fill-option,
  27. .page-number-rect-list li,
  28. .card-head-body .head-dynamic-rect {
  29. border-width: 0.5pt;
  30. }
  31. .elem-fill-question .option-item {
  32. line-height: 9px;
  33. }
  34. .package-number {
  35. display: block !important;
  36. }
  37. }
  38. // page-box
  39. .page-box {
  40. position: relative;
  41. background: #fff;
  42. margin: 0 auto;
  43. font-weight: normal;
  44. font-family: "Times New Roman", "宋体", "宋体-简", Arial, sans-serif;
  45. .package-number {
  46. position: absolute;
  47. width: 200px;
  48. height: 40px;
  49. top: 10px;
  50. right: 25%;
  51. margin-left: -100px;
  52. text-align: center;
  53. z-index: 99;
  54. display: none;
  55. img {
  56. display: block;
  57. height: 28px;
  58. width: 100%;
  59. border: none;
  60. }
  61. p {
  62. line-height: 1;
  63. font-size: 12px;
  64. margin: 0;
  65. }
  66. }
  67. .page-main {
  68. height: 100%;
  69. position: relative;
  70. white-space: nowrap;
  71. margin: 0 -10px;
  72. font-size: 0;
  73. &-2 {
  74. .page-column {
  75. width: 50%;
  76. }
  77. }
  78. &-3 {
  79. .page-column {
  80. width: 33.33%;
  81. }
  82. }
  83. &-4 {
  84. .page-column {
  85. width: 25%;
  86. }
  87. }
  88. }
  89. &-A3 {
  90. width: 1586px;
  91. height: 1122px;
  92. .page-main {
  93. &-inner {
  94. padding: 60px 80px;
  95. }
  96. }
  97. }
  98. &-A4 {
  99. width: 793px;
  100. height: 1122px;
  101. .page-main {
  102. &-inner {
  103. padding: 60px 45px;
  104. }
  105. }
  106. }
  107. &-less {
  108. .page-number-rect {
  109. display: none;
  110. }
  111. }
  112. }
  113. // 分栏间距,默认20px
  114. // page-main-inner
  115. .page-main-inner {
  116. position: absolute;
  117. width: 100%;
  118. height: 100%;
  119. top: 0;
  120. left: 0;
  121. padding: 60px 80px 86px;
  122. z-index: 9;
  123. font-size: 0;
  124. }
  125. // page-main-outer
  126. .page-main-outer {
  127. position: absolute;
  128. top: 0;
  129. left: 0;
  130. right: 0;
  131. bottom: 0;
  132. z-index: 7;
  133. background-color: transparent;
  134. overflow: hidden;
  135. }
  136. .page-column {
  137. display: inline-block;
  138. vertical-align: middle;
  139. position: relative;
  140. height: 100%;
  141. width: 100%;
  142. font-size: 14px;
  143. padding: 0 10px;
  144. &-forbid-area {
  145. position: absolute;
  146. top: 0;
  147. left: 0;
  148. bottom: 0;
  149. right: 0;
  150. z-index: 1;
  151. border: 1px solid #000;
  152. overflow: hidden;
  153. > p {
  154. padding: 20px;
  155. position: absolute;
  156. width: 260px;
  157. height: 82px;
  158. top: 50%;
  159. left: 50%;
  160. margin-top: -41px;
  161. margin-left: -130px;
  162. z-index: 9;
  163. font-weight: bold;
  164. font-size: 30px;
  165. color: #333;
  166. background-color: #fff;
  167. text-align: center;
  168. }
  169. }
  170. &-main {
  171. position: relative;
  172. height: 100%;
  173. }
  174. &-body {
  175. position: absolute;
  176. top: 0;
  177. bottom: 0;
  178. left: 0;
  179. right: 0;
  180. z-index: 9;
  181. }
  182. &-element {
  183. .element-item {
  184. position: relative;
  185. &-width {
  186. width: 100% !important;
  187. }
  188. &::before {
  189. content: "";
  190. position: absolute;
  191. width: 100%;
  192. height: 100%;
  193. top: 0;
  194. left: 0;
  195. box-sizing: border-box;
  196. z-index: 2;
  197. border: 1px solid #000;
  198. border-top: 0;
  199. }
  200. > div {
  201. z-index: 9;
  202. position: relative;
  203. }
  204. &-card-head {
  205. &::before {
  206. border: 0;
  207. }
  208. }
  209. &-topic-head {
  210. &::before {
  211. border: 0;
  212. }
  213. }
  214. &-fill-question,
  215. &-fill-line {
  216. &::before {
  217. border-bottom: 0;
  218. }
  219. }
  220. // 预览时,小题扩展答题区之间隐藏分割线
  221. &-explain {
  222. &::before {
  223. border-bottom-color: transparent;
  224. }
  225. }
  226. &-type-last {
  227. &::before {
  228. border-bottom: 1px solid #000;
  229. }
  230. }
  231. }
  232. &:last-child {
  233. .element-item {
  234. &::before {
  235. border-bottom: 1px solid #000;
  236. }
  237. }
  238. .element-item-card-head.element-item-type-pre {
  239. &::before {
  240. border-bottom: none;
  241. }
  242. }
  243. }
  244. }
  245. }
  246. // locator
  247. .page-locator {
  248. position: absolute;
  249. left: 80px;
  250. right: 80px;
  251. height: 16px;
  252. z-index: 8;
  253. &-top {
  254. top: 30px;
  255. }
  256. &-bottom {
  257. bottom: 30px;
  258. }
  259. &-item {
  260. position: absolute;
  261. width: 24px;
  262. border-bottom: 16px solid #000;
  263. top: 0;
  264. &:nth-of-type(1) {
  265. left: 0;
  266. }
  267. &:nth-of-type(2) {
  268. right: 96px;
  269. }
  270. }
  271. }
  272. .page-box-1 {
  273. .page-locator {
  274. &-bottom {
  275. .page-locator-item:nth-of-type(1) {
  276. right: 0;
  277. left: auto;
  278. }
  279. }
  280. &-item {
  281. &:nth-of-type(1) {
  282. left: 96px;
  283. }
  284. &:nth-of-type(2) {
  285. right: 0;
  286. }
  287. }
  288. }
  289. }
  290. // page-number
  291. .page-number {
  292. position: absolute;
  293. bottom: 30px;
  294. &-rect {
  295. left: 25%;
  296. transform: translateX(-50%);
  297. -webkit-transform: translateX(-50%);
  298. }
  299. &-rect-list {
  300. font-size: 0;
  301. li {
  302. display: inline-block;
  303. vertical-align: top;
  304. font-size: 14px;
  305. width: 24px;
  306. height: 16px;
  307. border: 1px solid #000;
  308. margin-right: 10px;
  309. &.rect-li-act {
  310. background-color: #000;
  311. }
  312. }
  313. }
  314. &-text {
  315. right: 25%;
  316. }
  317. &-text-cont {
  318. height: 16px;
  319. line-height: 16px;
  320. }
  321. }
  322. .page-box-A4 {
  323. .page-number-rect {
  324. left: 50%;
  325. }
  326. }
  327. // course-barcode
  328. .course-barcode {
  329. position: absolute;
  330. width: 200px;
  331. height: 40px;
  332. top: 10px;
  333. left: 50%;
  334. margin-left: -200px;
  335. text-align: center;
  336. img {
  337. display: block;
  338. height: 28px;
  339. width: 100%;
  340. border: none;
  341. }
  342. img[src=""] {
  343. display: none;
  344. }
  345. p {
  346. line-height: 1;
  347. font-size: 12px;
  348. margin: 0;
  349. }
  350. }
  351. // elem
  352. .elem {
  353. &-title {
  354. padding: 10px;
  355. font-size: 14px;
  356. font-weight: bold;
  357. color: rgba(0, 0, 0, 1);
  358. line-height: 1;
  359. white-space: normal;
  360. }
  361. &-body {
  362. padding: 10px;
  363. }
  364. }
  365. // grid
  366. .grid-container {
  367. margin-left: -10px;
  368. margin-right: -10px;
  369. }
  370. .grid-row {
  371. display: table;
  372. width: 100%;
  373. border-spacing: 10px 0;
  374. border-collapse: separate;
  375. &:nth-of-type(2) {
  376. margin-top: 10px;
  377. }
  378. .grid-col {
  379. display: table-cell;
  380. width: 50%;
  381. vertical-align: top;
  382. border: 1px solid #000;
  383. &-dash {
  384. border-style: dashed;
  385. vertical-align: middle;
  386. }
  387. }
  388. }
  389. // card-head
  390. .card-head {
  391. &-top {
  392. text-align: center;
  393. color: #000;
  394. }
  395. &-title {
  396. font-size: 24px;
  397. font-weight: bold;
  398. overflow: hidden;
  399. > h1 {
  400. line-height: 33px;
  401. white-space: nowrap;
  402. letter-spacing: -1px;
  403. }
  404. }
  405. &-subtitle {
  406. height: 44px;
  407. font-family: $--font-family;
  408. font-size: 14px;
  409. overflow: hidden;
  410. white-space: normal;
  411. margin-bottom: 10px;
  412. p {
  413. padding: 0 10px;
  414. line-height: 22px;
  415. height: 22px;
  416. white-space: pre;
  417. }
  418. }
  419. &-body {
  420. font-weight: normal;
  421. .el-col {
  422. padding-top: 5px;
  423. padding-bottom: 5px;
  424. }
  425. &-spin {
  426. padding: 5px 12px;
  427. white-space: normal;
  428. word-break: break-all;
  429. }
  430. .stdinfo-item {
  431. height: 30px;
  432. line-height: 30px;
  433. position: relative;
  434. overflow: hidden;
  435. &::after {
  436. content: "";
  437. display: block;
  438. position: absolute;
  439. width: 100%;
  440. border-bottom: 1px solid #000;
  441. bottom: 6px;
  442. left: 0;
  443. z-index: 1;
  444. }
  445. > span {
  446. z-index: 2;
  447. display: block;
  448. position: relative;
  449. font-size: 14px;
  450. &:first-child {
  451. float: left;
  452. background-color: #fff;
  453. text-align: justify;
  454. font-size: 0px;
  455. & > i {
  456. font-size: 14px;
  457. }
  458. &::after {
  459. content: "";
  460. display: inline-block;
  461. width: 100%;
  462. height: 0;
  463. line-height: 0;
  464. }
  465. }
  466. &:nth-of-type(2) {
  467. float: left;
  468. width: 20px;
  469. background-color: #fff;
  470. }
  471. &:last-child {
  472. margin-left: 80px;
  473. height: 100%;
  474. }
  475. }
  476. }
  477. .head-stdno {
  478. height: 100%;
  479. padding: 0;
  480. .stdno-empty {
  481. min-height: 130px;
  482. font-weight: bold;
  483. letter-spacing: 3px;
  484. text-align: center;
  485. position: relative;
  486. > p {
  487. position: absolute;
  488. left: 0;
  489. width: 100%;
  490. top: 50%;
  491. transform: translateY(-50%);
  492. -webkit-transform: translateY(-50%);
  493. }
  494. }
  495. .stdno-fill {
  496. min-height: 240px;
  497. height: 100%;
  498. position: relative;
  499. &-rect {
  500. font-size: 0;
  501. height: 27px;
  502. border-bottom: 1px solid #000;
  503. }
  504. &-number {
  505. display: inline-block;
  506. vertical-align: top;
  507. width: 7.692%;
  508. height: 100%;
  509. &:not(:last-child) {
  510. border-right: 1px solid #000;
  511. }
  512. }
  513. &-head {
  514. position: absolute;
  515. width: 100%;
  516. height: 51px;
  517. top: 0;
  518. left: 0;
  519. z-index: 9;
  520. > h5 {
  521. border-bottom: 1px solid #000;
  522. line-height: 24px;
  523. font-size: 14px;
  524. font-weight: bold;
  525. text-align: center;
  526. }
  527. }
  528. &-body {
  529. position: absolute;
  530. top: 0;
  531. bottom: 0;
  532. padding-top: 51px;
  533. display: table;
  534. width: 100%;
  535. }
  536. &-list {
  537. display: table-cell;
  538. width: 7.692%;
  539. padding: 1px 0;
  540. }
  541. &-option {
  542. margin: 8px auto;
  543. width: 18px;
  544. height: 10px;
  545. font-size: 12px;
  546. line-height: 8px;
  547. text-align: center;
  548. color: #000;
  549. // border-rect
  550. border: 1px solid #000;
  551. font-family: "Times New Roman", Arial, sans-serif;
  552. > i {
  553. display: inline-block;
  554. transform: scale(0.67, 0.67);
  555. -webkit-transform: scale(0.67, 0.67);
  556. }
  557. }
  558. }
  559. .stdno-auto {
  560. &-barcode {
  561. height: 70px;
  562. text-align: center;
  563. > img {
  564. display: block;
  565. height: 50px;
  566. width: 300px;
  567. margin: 0 auto;
  568. }
  569. > p {
  570. line-height: 20px;
  571. }
  572. }
  573. }
  574. }
  575. .head-notice {
  576. > h4 {
  577. font-weight: normal;
  578. margin-bottom: 8px;
  579. line-height: 20px;
  580. }
  581. &-cont {
  582. line-height: 1.5;
  583. font-size: 12px;
  584. margin-bottom: 5px;
  585. > span {
  586. display: block;
  587. &:first-child {
  588. width: 20px;
  589. white-space: nowrap;
  590. float: left;
  591. }
  592. &:last-child {
  593. margin-left: 20px;
  594. }
  595. }
  596. }
  597. &-exam-number-fill {
  598. span {
  599. display: inline;
  600. &:first-child {
  601. float: none;
  602. }
  603. &:last-child {
  604. margin: 0;
  605. }
  606. }
  607. }
  608. }
  609. .head-dynamic {
  610. padding: 0;
  611. font-size: 12px;
  612. border-spacing: 0;
  613. border-collapse: collapse;
  614. &-part:not(:last-child) {
  615. border-bottom: 1px solid #000;
  616. }
  617. &-write {
  618. padding: 5px 12px;
  619. .stdinfo-item {
  620. margin-bottom: 0;
  621. }
  622. > p {
  623. line-height: 18px;
  624. }
  625. }
  626. &-missfill {
  627. display: table;
  628. width: 100%;
  629. }
  630. &-miss {
  631. padding: 10px;
  632. display: table-cell;
  633. vertical-align: middle;
  634. &:nth-of-type(2) {
  635. border-left: 1px solid #000;
  636. }
  637. span {
  638. display: block;
  639. }
  640. .head-dynamic-content {
  641. height: 14px;
  642. line-height: 14px;
  643. }
  644. .dynamic-miss-title {
  645. width: 54px;
  646. float: left;
  647. }
  648. .dynamic-miss-body {
  649. margin-left: 54px;
  650. height: 14px;
  651. text-align: center;
  652. font-size: 0;
  653. }
  654. }
  655. &-fill {
  656. padding: 10px;
  657. p {
  658. display: inline-block;
  659. vertical-align: middle;
  660. line-height: 18px;
  661. word-wrap: normal;
  662. &:first-child {
  663. margin-right: 20px;
  664. }
  665. > span,
  666. > i {
  667. display: inline-block;
  668. vertical-align: middle;
  669. box-sizing: border-box;
  670. }
  671. &:first-child {
  672. i {
  673. width: 28px;
  674. height: 14px;
  675. background-color: #000;
  676. }
  677. }
  678. &:last-child {
  679. > i {
  680. width: 28px;
  681. height: 14px;
  682. border: 1px solid #000;
  683. font-size: 14px;
  684. font-weight: bold;
  685. margin-right: 6px;
  686. line-height: 12px;
  687. text-align: center;
  688. &:last-child {
  689. margin-right: 0;
  690. }
  691. // wkhtmltopdf 工具无法渲染如下样式:
  692. // &:nth-of-type(1) {
  693. // position: relative;
  694. // &::before {
  695. // content: "";
  696. // display: block;
  697. // position: absolute;
  698. // left: 30%;
  699. // top: 1px;
  700. // height: 5px;
  701. // width: 11px;
  702. // transform: rotate(-45deg);
  703. // border-left: 1px solid #000;
  704. // border-bottom: 1px solid #000;
  705. // }
  706. // }
  707. // &:nth-of-type(2) {
  708. // position: relative;
  709. // &::before {
  710. // content: "";
  711. // display: block;
  712. // position: absolute;
  713. // left: 7px;
  714. // top: 5px;
  715. // width: 11px;
  716. // transform: rotate(-45deg);
  717. // transform-origin: center center;
  718. // border-bottom: 1px solid #000;
  719. // }
  720. // &::after {
  721. // content: "";
  722. // display: block;
  723. // position: absolute;
  724. // left: 8px;
  725. // top: 5px;
  726. // width: 11px;
  727. // transform: rotate(45deg);
  728. // transform-origin: center center;
  729. // border-bottom: 1px solid #000;
  730. // }
  731. // }
  732. &:nth-of-type(3) {
  733. &::before {
  734. content: "";
  735. display: inline-block;
  736. vertical-align: top;
  737. margin-left: -5px;
  738. height: 100%;
  739. width: 5px;
  740. background-color: #000;
  741. }
  742. }
  743. &:nth-of-type(4) {
  744. &::before {
  745. content: "";
  746. display: inline-block;
  747. margin-top: 1px;
  748. width: 10px;
  749. height: 10px;
  750. border-radius: 50%;
  751. background-color: #000;
  752. }
  753. }
  754. }
  755. }
  756. }
  757. }
  758. &-rect {
  759. display: inline-block;
  760. vertical-align: middle;
  761. width: 24px;
  762. height: 12px;
  763. // border-rect
  764. border: 1px solid #000;
  765. font-size: 12px;
  766. text-align: center;
  767. line-height: 10px;
  768. color: #000;
  769. margin: 0 5px;
  770. font-family: "Times New Roman", Arial, sans-serif;
  771. > i {
  772. display: inline-block;
  773. transform: scale(0.67, 0.67);
  774. -webkit-transform: scale(0.67, 0.67);
  775. }
  776. }
  777. &-aorb {
  778. display: table;
  779. width: 100%;
  780. .dynamic-aorb-item {
  781. display: table-cell;
  782. vertical-align: middle;
  783. text-align: center;
  784. &:not(:last-child) {
  785. border-right: 1px solid #000;
  786. }
  787. }
  788. &-fill {
  789. .dynamic-aorb-item:first-child {
  790. border: none;
  791. }
  792. }
  793. .dynamic-aorb-title {
  794. width: 83px;
  795. }
  796. .dynamic-aorb-info {
  797. width: 50px;
  798. font-size: 16px;
  799. position: relative;
  800. overflow: hidden;
  801. .dynamic-aorb-content {
  802. position: absolute;
  803. top: 50%;
  804. left: 0;
  805. width: 100%;
  806. transform: translateY(-50%);
  807. -webkit-transform: translateY(-50%);
  808. z-index: auto;
  809. }
  810. }
  811. .dynamic-aorb-barcode {
  812. img {
  813. display: block;
  814. position: relative;
  815. margin: 0 auto;
  816. width: 200px;
  817. height: 26px;
  818. padding: 7px 0;
  819. }
  820. }
  821. .dynamic-aorb-rects {
  822. padding: 16px 10px;
  823. }
  824. }
  825. }
  826. }
  827. &-part {
  828. border: 1px solid #000;
  829. &:not(:last-child) {
  830. margin-bottom: 10px;
  831. }
  832. }
  833. &-normal {
  834. .head-dynamic {
  835. &-1 {
  836. .head-dynamic-part {
  837. height: 100%;
  838. }
  839. }
  840. }
  841. }
  842. &-narrow {
  843. .head-stdno {
  844. height: 138px;
  845. .stdno-auto {
  846. position: relative;
  847. top: 50%;
  848. margin-top: -40px;
  849. }
  850. }
  851. }
  852. &-handle {
  853. &.card-head-narrow {
  854. .head-stdno {
  855. height: 242px;
  856. }
  857. }
  858. }
  859. }
  860. // card-head-body-auto-resize
  861. .card-head-body-auto-resize {
  862. margin-left: -5px;
  863. margin-right: -5px;
  864. overflow: hidden;
  865. &.col-item-auto-height {
  866. .card-head-body-spin {
  867. height: auto;
  868. }
  869. }
  870. .head-dynamic-2 {
  871. .head-dynamic-part {
  872. height: auto;
  873. }
  874. }
  875. .rect-col {
  876. padding: 5px;
  877. &:first-child {
  878. float: left;
  879. width: 50%;
  880. }
  881. &:last-child {
  882. float: right;
  883. width: 50%;
  884. }
  885. &-item {
  886. border: 1px solid #000;
  887. &:nth-of-type(2) {
  888. margin-top: 10px;
  889. }
  890. &-none {
  891. border: none;
  892. margin: 0 !important;
  893. }
  894. }
  895. }
  896. }
  897. // elem-topic-head
  898. .elem-topic-head {
  899. text-align: center;
  900. .elem-body {
  901. padding: 0;
  902. border: 1px solid #000;
  903. }
  904. &-pad {
  905. padding-top: 10px;
  906. }
  907. &-empty {
  908. .elem-body {
  909. border-top: none;
  910. }
  911. }
  912. h3 {
  913. font-size: 16px;
  914. height: 29px;
  915. line-height: 28px;
  916. border-bottom: 1px dotted #000;
  917. font-weight: normal;
  918. }
  919. p {
  920. font-size: 12px;
  921. height: 22px;
  922. line-height: 22px;
  923. white-space: nowrap;
  924. overflow: hidden;
  925. // text-overflow: ellipsis;
  926. }
  927. }
  928. // elem-line
  929. .elem-line-horizontal {
  930. height: 100%;
  931. line-height: 30px;
  932. .line-body {
  933. display: inline-block;
  934. vertical-align: middle;
  935. width: 100%;
  936. border-bottom: 1px solid #000;
  937. }
  938. }
  939. .elem-line-vertical {
  940. height: 100%;
  941. text-align: center;
  942. .line-body {
  943. display: inline-block;
  944. vertical-align: top;
  945. height: 100%;
  946. border-left: 1px solid #000;
  947. }
  948. }
  949. // elem-lines
  950. .elem-lines {
  951. .line-item {
  952. display: inline-block;
  953. vertical-align: top;
  954. }
  955. }
  956. // elem-rect
  957. .elem-rect {
  958. .rect-body {
  959. position: absolute;
  960. width: 100%;
  961. height: 100%;
  962. top: 0;
  963. left: 0;
  964. }
  965. }
  966. // elem-text
  967. .elem-text {
  968. .text-body {
  969. padding: 5px;
  970. line-height: 1.4;
  971. span {
  972. white-space: pre-wrap;
  973. word-wrap: normal;
  974. word-break: break-all;
  975. &.cont-variate {
  976. color: #a0a0a0;
  977. margin: 0 2px;
  978. }
  979. }
  980. }
  981. }
  982. // elem-barcode
  983. .elem-barcode {
  984. height: 100%;
  985. border-color: transparent;
  986. border-width: 1pt;
  987. position: relative;
  988. > img {
  989. max-height: 100%;
  990. max-width: 100%;
  991. position: absolute;
  992. top: 0;
  993. bottom: 0;
  994. left: 0;
  995. right: 0;
  996. margin: auto;
  997. }
  998. }
  999. // elem-image
  1000. .elem-image {
  1001. height: 100%;
  1002. border-color: transparent;
  1003. border-width: 1pt;
  1004. position: relative;
  1005. > p {
  1006. position: absolute;
  1007. width: 100%;
  1008. height: 100%;
  1009. top: 0;
  1010. left: 0;
  1011. display: table;
  1012. text-align: center;
  1013. color: #b0b0b0;
  1014. font-size: 30pt;
  1015. i {
  1016. display: table-cell;
  1017. vertical-align: middle;
  1018. }
  1019. }
  1020. > img {
  1021. max-height: 100%;
  1022. max-width: 100%;
  1023. position: absolute;
  1024. top: 0;
  1025. bottom: 0;
  1026. left: 0;
  1027. right: 0;
  1028. margin: auto;
  1029. }
  1030. }
  1031. // elem-girds
  1032. .elem-grids {
  1033. > table {
  1034. table-layout: fixed;
  1035. border-spacing: 0;
  1036. border-collapse: collapse;
  1037. td {
  1038. border: 1px solid #000;
  1039. }
  1040. }
  1041. &-halving {
  1042. > table {
  1043. table-layout: auto;
  1044. width: 100%;
  1045. }
  1046. td > div {
  1047. padding-bottom: 100%;
  1048. }
  1049. }
  1050. }
  1051. .elem-pane {
  1052. height: 100%;
  1053. }
  1054. // elem-fill-question
  1055. .elem-fill-question {
  1056. white-space: normal;
  1057. // 客观题强调标记
  1058. &-first::before {
  1059. content: "";
  1060. position: absolute;
  1061. right: 0;
  1062. top: 0;
  1063. z-index: 99;
  1064. color: #fff;
  1065. padding: 6px 10px;
  1066. line-height: 1;
  1067. font-size: 18px;
  1068. border-bottom-left-radius: 10px;
  1069. }
  1070. &-first.elem-fill-question-simple {
  1071. &::before {
  1072. content: "单选";
  1073. background-color: mix(#fff, $--color-success, 20%);
  1074. }
  1075. }
  1076. &-first.elem-fill-question-multiply {
  1077. &::before {
  1078. content: "多选";
  1079. background-color: $--color-primary-light;
  1080. }
  1081. }
  1082. &-first.elem-fill-question-boolean {
  1083. &::before {
  1084. content: "判断";
  1085. background-color: mix(#fff, $--color-warning, 20%);
  1086. }
  1087. }
  1088. &-boolean {
  1089. .option-item {
  1090. &:nth-of-type(2) i {
  1091. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAItJREFUOE/Vk9ERgCAMQ8M+GUInEyfTITKQV065KuDh8SWftHkNAQIGVxjU44cAkhHAAmCVFD8dwYktulnS3g2oiY2SAdZglmq34sS7pNn3JADJCcAGoGggaftWL2qFgzOc3OjEKbCau1sG3uo51TRN8c3BRX+E9SquAlwmU8t2EeLIf+h+B60hw4ADyTE7EWzzfYYAAAAASUVORK5CYII=);
  1092. background-size: 100% 100%;
  1093. width: 10px;
  1094. height: 10px;
  1095. margin-top: -1px;
  1096. }
  1097. &:nth-of-type(3) i {
  1098. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAIVJREFUOE+tk9sNwCAIRa/7MES7WTerQ7BPGxolCpKmVT+Fe3gnTL40qUcHIKKNmXMEFTsA8TmqjwKK8SyG3YIiewQQjkKMGMysOlcCgJrFAykZdX9tdq6JNprphyttOIUA4sQCXw+YKmEg/tZEIrqapoVjbEe8bpEk8tsqj3zWHtOfy7wB41tXEXo/wKEAAAAASUVORK5CYII=);
  1099. background-size: 100% 100%;
  1100. width: 8px;
  1101. height: 8px;
  1102. }
  1103. }
  1104. }
  1105. .elem-body {
  1106. padding: 10px 5px;
  1107. font-size: 0;
  1108. }
  1109. .group-item {
  1110. font-family: "Times New Roman", Arial, sans-serif;
  1111. display: inline-block;
  1112. vertical-align: top;
  1113. font-size: 0;
  1114. // margin-bottom: 20px;
  1115. }
  1116. .question-item {
  1117. font-size: 0;
  1118. }
  1119. .option-item {
  1120. display: inline-block;
  1121. vertical-align: middle;
  1122. padding: 0;
  1123. width: 18px;
  1124. height: 10px;
  1125. text-align: center;
  1126. font-size: 12px;
  1127. line-height: 8px;
  1128. // border-rect
  1129. border: 1px solid #000;
  1130. color: #000;
  1131. box-sizing: border-box;
  1132. > i {
  1133. display: inline-block;
  1134. transform: scale(0.67, 0.67);
  1135. -webkit-transform: scale(0.67, 0.67);
  1136. }
  1137. &:first-child {
  1138. text-align: center;
  1139. border: none;
  1140. font-size: 12px;
  1141. line-height: 10px;
  1142. color: #000;
  1143. > i {
  1144. transform: scale(0.9, 0.9);
  1145. -webkit-transform: scale(0.9, 0.9);
  1146. }
  1147. }
  1148. &:last-child {
  1149. margin-right: 0 !important;
  1150. }
  1151. }
  1152. &-vertical {
  1153. .elem-body {
  1154. padding: 10px 20px;
  1155. }
  1156. .question-item {
  1157. display: inline-block;
  1158. vertical-align: top;
  1159. &:last-child {
  1160. margin-right: 0 !important;
  1161. }
  1162. }
  1163. .option-item {
  1164. display: block;
  1165. &:first-child {
  1166. padding: 0;
  1167. text-align: center;
  1168. }
  1169. &:last-child {
  1170. margin-bottom: 0 !important;
  1171. }
  1172. }
  1173. }
  1174. }
  1175. // elem-fill-area
  1176. .elem-fill-area {
  1177. .option-item {
  1178. display: inline-block;
  1179. vertical-align: middle;
  1180. width: 30px;
  1181. height: 16px;
  1182. border: 1px solid #000;
  1183. &:last-child {
  1184. margin-right: 0 !important;
  1185. }
  1186. }
  1187. &-vertical {
  1188. .option-item {
  1189. display: block;
  1190. &:last-child {
  1191. margin-bottom: 0 !important;
  1192. }
  1193. }
  1194. }
  1195. }
  1196. // elem-fill-line
  1197. .elem-fill-line {
  1198. white-space: normal;
  1199. .elem-body {
  1200. padding: 0 15px 0 10px;
  1201. font-size: 0;
  1202. }
  1203. .elem-fill-quesiton {
  1204. display: inline-block;
  1205. vertical-align: top;
  1206. position: relative;
  1207. padding: 0 1px;
  1208. font-size: 12px;
  1209. li {
  1210. &.elem-fill-line {
  1211. height: 40px;
  1212. position: relative;
  1213. margin: 0 10px 0 20px;
  1214. z-index: 8;
  1215. &::after {
  1216. content: "";
  1217. display: block;
  1218. position: absolute;
  1219. width: 100%;
  1220. border-bottom: 1px solid #000;
  1221. bottom: 8px;
  1222. }
  1223. }
  1224. &.elem-fill-no {
  1225. position: absolute;
  1226. top: 2px;
  1227. bottom: 2px;
  1228. left: 1px;
  1229. z-index: 9;
  1230. min-width: 20px;
  1231. text-align: left;
  1232. background-color: #fff;
  1233. border: none;
  1234. span {
  1235. display: block;
  1236. position: relative;
  1237. padding-bottom: 5px;
  1238. padding-right: 3px;
  1239. transform: translateY(-100%);
  1240. -webkit-transform: translateY(-100%);
  1241. }
  1242. }
  1243. &.elem-fill-comma {
  1244. position: absolute;
  1245. top: 0;
  1246. right: -10px;
  1247. z-index: 9;
  1248. transform: translateY(-100%);
  1249. -webkit-transform: translateY(-100%);
  1250. width: 10px;
  1251. padding-bottom: 4px;
  1252. background-color: #fff;
  1253. text-align: center;
  1254. border: none;
  1255. }
  1256. }
  1257. }
  1258. }
  1259. // elem-explain
  1260. .elem-explain {
  1261. .elem-title {
  1262. padding-bottom: 0;
  1263. }
  1264. .elem-body {
  1265. min-height: 60px;
  1266. position: relative;
  1267. }
  1268. .elem-explain-no {
  1269. position: absolute;
  1270. left: 20px;
  1271. top: 10px;
  1272. font-size: 12px;
  1273. z-index: 9;
  1274. }
  1275. .elem-explain-elements {
  1276. position: absolute;
  1277. width: 100%;
  1278. height: 100%;
  1279. top: 0;
  1280. left: 0;
  1281. z-index: 8;
  1282. }
  1283. .elem-explain-element {
  1284. .explain-element-body {
  1285. position: absolute;
  1286. }
  1287. }
  1288. }
  1289. // .elem-composition
  1290. .elem-composition {
  1291. .elem-title {
  1292. padding-bottom: 0;
  1293. }
  1294. .elem-body {
  1295. min-height: 60px;
  1296. position: relative;
  1297. }
  1298. &-elements {
  1299. position: absolute;
  1300. width: 100%;
  1301. height: 100%;
  1302. top: 0;
  1303. left: 0;
  1304. z-index: 8;
  1305. }
  1306. .elem-composition-element {
  1307. .composition-element-body {
  1308. position: absolute;
  1309. overflow: hidden;
  1310. }
  1311. }
  1312. }
  1313. // elem-fill-number
  1314. .elem-fill-number {
  1315. border: 1px solid #000;
  1316. .fill-number {
  1317. &-rect {
  1318. font-size: 0;
  1319. height: 27px;
  1320. border-bottom: 1px solid #000;
  1321. }
  1322. &-number {
  1323. display: inline-block;
  1324. vertical-align: top;
  1325. width: 7.692%;
  1326. height: 100%;
  1327. &:not(:last-child) {
  1328. border-right: 1px solid #000;
  1329. }
  1330. }
  1331. &-head {
  1332. height: 51px;
  1333. > h5 {
  1334. border-bottom: 1px solid #000;
  1335. line-height: 24px;
  1336. font-size: 16px;
  1337. font-weight: bold;
  1338. text-align: center;
  1339. }
  1340. }
  1341. &-body {
  1342. display: table;
  1343. width: 100%;
  1344. }
  1345. &-list {
  1346. display: table-cell;
  1347. width: 7.692%;
  1348. padding: 1px 0;
  1349. }
  1350. &-option {
  1351. margin: 8px auto;
  1352. width: 18px;
  1353. height: 10px;
  1354. font-size: 12px;
  1355. line-height: 8px;
  1356. text-align: center;
  1357. color: #000;
  1358. // border-rect
  1359. border: 1px solid #000;
  1360. font-family: "Times New Roman", Arial, sans-serif;
  1361. > i {
  1362. display: inline-block;
  1363. transform: scale(0.67, 0.67);
  1364. -webkit-transform: scale(0.67, 0.67);
  1365. }
  1366. }
  1367. }
  1368. }
  1369. // elem-fill-field
  1370. .elem-fill-field {
  1371. white-space: normal;
  1372. overflow: hidden;
  1373. }
  1374. .fill-field {
  1375. &-item {
  1376. display: inline-block;
  1377. padding: 0 10px;
  1378. width: 100%;
  1379. }
  1380. &-content {
  1381. height: 30px;
  1382. line-height: 26px;
  1383. overflow: hidden;
  1384. position: relative;
  1385. &::after {
  1386. content: "";
  1387. display: block;
  1388. position: absolute;
  1389. width: 100%;
  1390. border-bottom: 1px solid #000;
  1391. bottom: 2px;
  1392. left: 0;
  1393. z-index: 1;
  1394. }
  1395. > span {
  1396. z-index: 2;
  1397. display: block;
  1398. position: relative;
  1399. font-size: 14px;
  1400. &:first-child {
  1401. float: left;
  1402. background-color: #fff;
  1403. text-align: justify;
  1404. font-size: 0px;
  1405. & > i {
  1406. font-size: 14px;
  1407. }
  1408. &::after {
  1409. content: "";
  1410. display: inline-block;
  1411. width: 100%;
  1412. height: 0;
  1413. line-height: 0;
  1414. }
  1415. }
  1416. &:nth-of-type(2) {
  1417. float: left;
  1418. width: 20px;
  1419. background-color: #fff;
  1420. }
  1421. &:last-child {
  1422. margin-left: 80px;
  1423. height: 100%;
  1424. }
  1425. }
  1426. }
  1427. }
  1428. // elem-fill-pane
  1429. .elem-fill-pane {
  1430. font-size: 0;
  1431. white-space: normal;
  1432. overflow: hidden;
  1433. .fill-pane {
  1434. &-item {
  1435. display: inline-block;
  1436. vertical-align: top;
  1437. font-size: 14px;
  1438. }
  1439. &-cont {
  1440. border: 1px solid #000;
  1441. }
  1442. }
  1443. }
  1444. // elem-forbid-area
  1445. .elem-forbid-area {
  1446. height: 100%;
  1447. position: relative;
  1448. .text-body {
  1449. position: absolute;
  1450. width: 100%;
  1451. left: 0;
  1452. top: 50%;
  1453. transform: translateY(-50%);
  1454. -webkit-transform: translateY(-50%);
  1455. font-size: 30px;
  1456. text-align: center;
  1457. }
  1458. }
  1459. // elem-fill-table
  1460. .elem-fill-table {
  1461. .table {
  1462. width: 100%;
  1463. border-spacing: 0;
  1464. border-collapse: collapse;
  1465. text-align: left;
  1466. td {
  1467. padding: 0;
  1468. }
  1469. }
  1470. }
  1471. // elem-undertaking
  1472. .elem-undertaking {
  1473. position: absolute;
  1474. width: 60px;
  1475. top: 60px;
  1476. bottom: 60px;
  1477. right: 10px;
  1478. font-size: 12px;
  1479. line-height: 15px;
  1480. .para-text {
  1481. width: 15px;
  1482. text-align: center;
  1483. position: absolute;
  1484. top: 0;
  1485. span {
  1486. display: inline-block;
  1487. transform: rotate(90deg);
  1488. -webkit-transform: rotate(90deg);
  1489. }
  1490. em {
  1491. display: inline-block;
  1492. margin-left: 5px;
  1493. margin-bottom: 5px;
  1494. height: 10px;
  1495. line-height: 10px;
  1496. }
  1497. }
  1498. .para-title {
  1499. right: 0;
  1500. top: 50%;
  1501. transform: translateY(-50%);
  1502. -webkit-transform: translateY(-50%);
  1503. }
  1504. .para-cl {
  1505. right: 15px;
  1506. }
  1507. .para-body {
  1508. right: 30px;
  1509. height: 100%;
  1510. width: 30px;
  1511. > p {
  1512. display: block;
  1513. width: 15px;
  1514. height: 100%;
  1515. float: right;
  1516. &:first-child {
  1517. padding-top: 30px;
  1518. }
  1519. }
  1520. }
  1521. .para-std {
  1522. bottom: 150px;
  1523. top: auto;
  1524. left: 0;
  1525. }
  1526. }
  1527. // card-free-preview
  1528. .card-free-preview {
  1529. &:not(.card-print) {
  1530. padding: 10px 0;
  1531. background-color: #f0f0f0;
  1532. .page-box {
  1533. margin: 10px auto;
  1534. box-shadow: 0 0 4px #ddd;
  1535. }
  1536. }
  1537. .page-column-element {
  1538. .element-item {
  1539. position: absolute;
  1540. overflow: hidden;
  1541. &::before {
  1542. display: none;
  1543. }
  1544. }
  1545. }
  1546. }
  1547. @media print {
  1548. .card-preview {
  1549. padding: 0;
  1550. .page-box {
  1551. margin: 0 auto;
  1552. box-shadow: none;
  1553. page-break-after: always;
  1554. }
  1555. // 印刷模式:隐藏客观题强调标记
  1556. .elem-fill-question-first {
  1557. &::before {
  1558. display: none;
  1559. }
  1560. }
  1561. .elem-fill-question .option-item,
  1562. .card-print .elem-fill-number .fill-number-option,
  1563. .card-head-body .head-stdno .stdno-fill-option,
  1564. .page-number-rect-list li,
  1565. .card-head-body .head-dynamic-rect {
  1566. border-width: 0.5pt;
  1567. }
  1568. .elem-fill-question .option-item {
  1569. line-height: 9px;
  1570. }
  1571. }
  1572. }