parse.css 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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 .s {
  129. display: inline;
  130. }
  131. .wxParse .a {
  132. color: deepskyblue;
  133. }
  134. .wxParse .video {
  135. text-align: center;
  136. margin: 22upx 0;
  137. }
  138. .wxParse .video-video {
  139. width: 100%;
  140. }
  141. .wxParse .uni-image{
  142. max-width: 100%;
  143. }
  144. .wxParse .img {
  145. display: block;
  146. max-width: 100%;
  147. margin-bottom: 0em;/* //与p标签底部padding同时修改 */
  148. overflow: hidden;
  149. }
  150. .wxParse .blockquote {
  151. margin: 10upx 0;
  152. padding: 22upx 0 22upx 22upx;
  153. font-family: Courier, Calibri, "宋体";
  154. background: #f5f5f5;
  155. border-left: 6upx solid #dbdbdb;
  156. }
  157. .wxParse .blockquote .p {
  158. margin: 0;
  159. }
  160. .wxParse .ul, .wxParse .ol {
  161. display: block;
  162. margin: 1em 0;
  163. padding-left: 2em;
  164. }
  165. .wxParse .ol {
  166. list-style-type: disc;
  167. }
  168. .wxParse .ol {
  169. list-style-type: decimal;
  170. }
  171. .wxParse .ol>weixin-parse-template,.wxParse .ul>weixin-parse-template {
  172. display: list-item;
  173. align-items: baseline;
  174. text-align: match-parent;
  175. }
  176. .wxParse .ol>.li,.wxParse .ul>.li {
  177. display: list-item;
  178. align-items: baseline;
  179. text-align: match-parent;
  180. }
  181. .wxParse .ul .ul, .wxParse .ol .ul {
  182. list-style-type: circle;
  183. }
  184. .wxParse .ol .ol .ul, .wxParse .ol .ul .ul, .wxParse .ul .ol .ul, .wxParse .ul .ul .ul {
  185. list-style-type: square;
  186. }
  187. .wxParse .u {
  188. text-decoration: underline;
  189. }
  190. .wxParse .hide {
  191. display: none;
  192. }
  193. .wxParse .del {
  194. display: inline;
  195. }
  196. .wxParse .figure {
  197. overflow: hidden;
  198. }
  199. .wxParse .table .table{
  200. border-collapse:collapse;
  201. box-sizing: border-box;
  202. /* 内边框 */
  203. border: 1px solid #dadada;
  204. width: 100%;
  205. }
  206. .wxParse .tbody{
  207. border-collapse:collapse;
  208. box-sizing: border-box;
  209. /* 内边框 */
  210. border: 1px solid #dadada;
  211. }
  212. .wxParse .thead, .wxParse .tfoot, .wxParse .th{
  213. border-collapse:collapse;
  214. box-sizing: border-box;
  215. background: #ececec;
  216. font-weight: 40;
  217. }
  218. .wxParse .tr {
  219. border-collapse:collapse;
  220. box-sizing: border-box;
  221. /* border: 2px solid #F0AD4E; */
  222. overflow:auto;
  223. }
  224. .wxParse .th,
  225. .wxParse .td{
  226. border-collapse:collapse;
  227. box-sizing: border-box;
  228. border: 2upx solid #dadada;
  229. overflow:auto;
  230. }
  231. .wxParse .audio, .wxParse .uni-audio-default{
  232. display: block;
  233. }