金诚优选前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

240 lines
4.1 KiB

  1. /**
  2. * author: Di (微信小程序开发工程师)
  3. * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
  4. * 垂直微信小程序开发交流社区
  5. *
  6. * github地址: https://github.com/icindy/wxParse
  7. *
  8. * for: 微信小程序富文本解析
  9. * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
  10. */
  11. /**
  12. * 请在全局下引入该文件@import '/static/wxParse.css';
  13. */
  14. .wxParse {
  15. user-select:none;
  16. width: 100%;
  17. font-family: Helvetica, "PingFangSC", 'Microsoft Yahei', '微软雅黑', Arial, sans-serif;
  18. color: #333;
  19. line-height: 1.5;
  20. font-size: 1em;
  21. text-align:justify;/* //左右两端对齐 */
  22. }
  23. .wxParse view ,.wxParse uni-view{
  24. word-break: break-word;
  25. }
  26. .wxParse .p {
  27. padding-bottom: 1em;
  28. clear: both;
  29. /* letter-spacing: 0;//字间距 */
  30. }
  31. .wxParse .inline {
  32. display: inline;
  33. margin: 0;
  34. padding: 0;
  35. }
  36. .wxParse .div {
  37. margin: 0;
  38. padding: 0;
  39. display: block;
  40. }
  41. .wxParse .h1{
  42. font-size: 2em;
  43. line-height: 1.2em;
  44. margin: 0.67em 0;
  45. }
  46. .wxParse .h2{
  47. font-size: 1.5em;
  48. margin: 0.83em 0;
  49. }
  50. .wxParse .h3{
  51. font-size: 1.17em;
  52. margin: 1em 0;
  53. }
  54. .wxParse .h4{
  55. margin: 1.33em 0;
  56. }
  57. .wxParse .h5{
  58. font-size: 0.83em;
  59. margin: 1.67em 0;
  60. }
  61. .wxParse .h6{
  62. font-size: 0.83em;
  63. margin: 1.67em 0;
  64. }
  65. .wxParse .h1,
  66. .wxParse .h2,
  67. .wxParse .h3,
  68. .wxParse .h4,
  69. .wxParse .h5,
  70. .wxParse .h6,
  71. .wxParse .b,
  72. .wxParse .strong{
  73. font-weight: bolder;
  74. }
  75. .wxParse .i,
  76. .wxParse .cite,
  77. .wxParse .em,
  78. .wxParse .var,
  79. .wxParse .address {
  80. font-style: italic;
  81. }
  82. .wxParse .pre,
  83. .wxParse .tt,
  84. .wxParse .code,
  85. .wxParse .kbd,
  86. .wxParse .samp {
  87. font-family: monospace;
  88. }
  89. .wxParse .pre {
  90. overflow: auto;
  91. background: #f5f5f5;
  92. padding: 16upx;
  93. white-space: pre;
  94. margin: 1em 0upx;
  95. }
  96. .wxParse .code {
  97. display: inline;
  98. background: #f5f5f5;
  99. }
  100. .wxParse .big {
  101. font-size: 1.17em;
  102. }
  103. .wxParse .small,
  104. .wxParse .sub,
  105. .wxParse .sup {
  106. font-size: 0.83em;
  107. }
  108. .wxParse .sub {
  109. vertical-align: sub;
  110. }
  111. .wxParse .sup {
  112. vertical-align: super;
  113. }
  114. .wxParse .s,
  115. .wxParse .strike,
  116. .wxParse .del {
  117. text-decoration: line-through;
  118. }
  119. .wxParse .strong,
  120. .wxParse .s {
  121. display: inline;
  122. }
  123. .wxParse .a {
  124. color: deepskyblue;
  125. }
  126. .wxParse .video {
  127. text-align: center;
  128. margin: 22upx 0;
  129. }
  130. .wxParse .video-video {
  131. width: 100%;
  132. }
  133. .wxParse .uni-image{
  134. max-width: 100%;
  135. }
  136. .wxParse .img {
  137. display: block;
  138. max-width: 100%;
  139. margin-bottom: -1em;/* //与p标签底部padding同时修改 */
  140. overflow: hidden;
  141. }
  142. .wxParse .blockquote {
  143. margin: 10upx 0;
  144. padding: 22upx 0 22upx 22upx;
  145. font-family: Courier, Calibri, "宋体";
  146. background: #f5f5f5;
  147. border-left: 6upx solid #dbdbdb;
  148. }
  149. .wxParse .blockquote .p {
  150. margin: 0;
  151. }
  152. .wxParse .ul, .wxParse .ol {
  153. display: block;
  154. margin: 1em 0;
  155. padding-left: 2em;
  156. }
  157. .wxParse .ol {
  158. list-style-type: disc;
  159. }
  160. .wxParse .ol {
  161. list-style-type: decimal;
  162. }
  163. .wxParse .ol>weixin-parse-template,.wxParse .ul>weixin-parse-template {
  164. display: list-item;
  165. align-items: baseline;
  166. text-align: match-parent;
  167. }
  168. .wxParse .ol>.li,.wxParse .ul>.li {
  169. display: list-item;
  170. align-items: baseline;
  171. text-align: match-parent;
  172. }
  173. .wxParse .ul .ul, .wxParse .ol .ul {
  174. list-style-type: circle;
  175. }
  176. .wxParse .ol .ol .ul, .wxParse .ol .ul .ul, .wxParse .ul .ol .ul, .wxParse .ul .ul .ul {
  177. list-style-type: square;
  178. }
  179. .wxParse .u {
  180. text-decoration: underline;
  181. }
  182. .wxParse .hide {
  183. display: none;
  184. }
  185. .wxParse .del {
  186. display: inline;
  187. }
  188. .wxParse .figure {
  189. overflow: hidden;
  190. }
  191. .wxParse .table {
  192. border-collapse:collapse;
  193. box-sizing: border-box;
  194. /* 内边框 */
  195. border: 1px solid #dadada;
  196. width: 100%;
  197. }
  198. .wxParse .tbody{
  199. border-collapse:collapse;
  200. box-sizing: border-box;
  201. /* 内边框 */
  202. border: 1px solid #dadada;
  203. }
  204. .wxParse .thead, .wxParse .tfoot, .wxParse .th{
  205. border-collapse:collapse;
  206. box-sizing: border-box;
  207. background: #ececec;
  208. font-weight: 40;
  209. }
  210. .wxParse .tr {
  211. border-collapse:collapse;
  212. box-sizing: border-box;
  213. /* border: 2px solid #F0AD4E; */
  214. overflow:auto;
  215. }
  216. .wxParse .th,
  217. .wxParse .td{
  218. border-collapse:collapse;
  219. box-sizing: border-box;
  220. border: 2upx solid #dadada;
  221. overflow:auto;
  222. }
  223. .wxParse .audio, .wxParse .uni-audio-default{
  224. display: block;
  225. }