25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

258 satır
4.4 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: 0.5em;
  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 .spaceshow{
  83. white-space: pre;
  84. }
  85. .wxParse .pre,
  86. .wxParse .tt,
  87. .wxParse .code,
  88. .wxParse .kbd,
  89. .wxParse .samp {
  90. font-family: monospace;
  91. }
  92. .wxParse .pre {
  93. overflow: auto;
  94. background: #f5f5f5;
  95. padding: 16upx;
  96. white-space: pre;
  97. margin: 1em 0upx;
  98. font-size: 24upx;
  99. }
  100. .wxParse .code {
  101. overflow: auto;
  102. padding: 16upx;
  103. white-space: pre;
  104. margin: 1em 0upx;
  105. background: #f5f5f5;
  106. font-size: 24upx;
  107. }
  108. .wxParse .big {
  109. font-size: 1.17em;
  110. }
  111. .wxParse .small,
  112. .wxParse .sub,
  113. .wxParse .sup {
  114. font-size: 0.83em;
  115. }
  116. .wxParse .sub {
  117. vertical-align: sub;
  118. }
  119. .wxParse .sup {
  120. vertical-align: super;
  121. }
  122. .wxParse .s,
  123. .wxParse .strike,
  124. .wxParse .del {
  125. text-decoration: line-through;
  126. }
  127. .wxParse .strong,
  128. .wxParse .text,
  129. .wxParse .span,
  130. .wxParse .s {
  131. display: inline;
  132. }
  133. .wxParse .a {
  134. color: deepskyblue;
  135. }
  136. .wxParse .video {
  137. text-align: center;
  138. margin: 22upx 0;
  139. }
  140. .wxParse .video-video {
  141. width: 100%;
  142. }
  143. .wxParse .uni-image{
  144. max-width: 100%;
  145. }
  146. .wxParse .img {
  147. display: block;
  148. max-width: 100%;
  149. margin-bottom: 0em;/* //与p标签底部padding同时修改 */
  150. overflow: hidden;
  151. }
  152. .wxParse .blockquote {
  153. margin: 10upx 0;
  154. padding: 22upx 0 22upx 22upx;
  155. font-family: Courier, Calibri, "宋体";
  156. background: #f5f5f5;
  157. border-left: 6upx solid #dbdbdb;
  158. }
  159. .wxParse .blockquote .p {
  160. margin: 0;
  161. }
  162. .wxParse .ul, .wxParse .ol {
  163. display: block;
  164. margin: 1em 0;
  165. padding-left: 2em;
  166. }
  167. .wxParse .ol {
  168. list-style-type: disc;
  169. }
  170. .wxParse .ol {
  171. list-style-type: decimal;
  172. }
  173. .wxParse .ol>weixin-parse-template,.wxParse .ul>weixin-parse-template {
  174. display: list-item;
  175. align-items: baseline;
  176. text-align: match-parent;
  177. }
  178. .wxParse .ol>.li,.wxParse .ul>.li {
  179. display: list-item;
  180. align-items: baseline;
  181. text-align: match-parent;
  182. }
  183. .wxParse .ul .ul, .wxParse .ol .ul {
  184. list-style-type: circle;
  185. }
  186. .wxParse .ol .ol .ul, .wxParse .ol .ul .ul, .wxParse .ul .ol .ul, .wxParse .ul .ul .ul {
  187. list-style-type: square;
  188. }
  189. .wxParse .u {
  190. text-decoration: underline;
  191. }
  192. .wxParse .hide {
  193. display: none;
  194. }
  195. .wxParse .del {
  196. display: inline;
  197. }
  198. .wxParse .figure {
  199. overflow: hidden;
  200. }
  201. .wxParse .tablebox{
  202. overflow: auto;
  203. background-color: #f5f5f5;
  204. background: #f5f5f5;
  205. font-size: 13px;
  206. padding: 8px;
  207. }
  208. .wxParse .table .table,.wxParse .table{
  209. border-collapse:collapse;
  210. box-sizing: border-box;
  211. /* 内边框 */
  212. /* width: 100%; */
  213. overflow: auto;
  214. white-space: pre;
  215. }
  216. .wxParse .tbody{
  217. border-collapse:collapse;
  218. box-sizing: border-box;
  219. /* 内边框 */
  220. border: 1px solid #dadada;
  221. }
  222. .wxParse .table .thead, .wxParse .table .tfoot, .wxParse .table .th{
  223. border-collapse:collapse;
  224. box-sizing: border-box;
  225. background: #ececec;
  226. font-weight: 40;
  227. }
  228. .wxParse .table .tr {
  229. border-collapse:collapse;
  230. box-sizing: border-box;
  231. /* border: 2px solid #F0AD4E; */
  232. overflow:auto;
  233. }
  234. .wxParse .table .th,
  235. .wxParse .table .td{
  236. border-collapse:collapse;
  237. box-sizing: border-box;
  238. border: 2upx solid #dadada;
  239. overflow:auto;
  240. }
  241. .wxParse .audio, .wxParse .uni-audio-default{
  242. display: block;
  243. }