parse.css 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  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. .p:empty{
  42. display: none;
  43. }
  44. .wxParse .h1{
  45. font-size: 2em;
  46. line-height: 1.2em;
  47. margin: 0.67em 0;
  48. }
  49. .wxParse .h2{
  50. font-size: 1.5em;
  51. margin: 0.83em 0;
  52. }
  53. .wxParse .h3{
  54. font-size: 1.17em;
  55. margin: 1em 0;
  56. }
  57. .wxParse .h4{
  58. margin: 1.33em 0;
  59. }
  60. .wxParse .h5{
  61. font-size: 0.83em;
  62. margin: 1.67em 0;
  63. }
  64. .wxParse .h6{
  65. font-size: 0.83em;
  66. margin: 1.67em 0;
  67. }
  68. .wxParse .h1,
  69. .wxParse .h2,
  70. .wxParse .h3,
  71. .wxParse .h4,
  72. .wxParse .h5,
  73. .wxParse .h6,
  74. .wxParse .b,
  75. .wxParse .strong{
  76. font-weight: bolder;
  77. }
  78. .wxParse .i,
  79. .wxParse .cite,
  80. .wxParse .em,
  81. .wxParse .var,
  82. .wxParse .address {
  83. font-style: italic;
  84. }
  85. .wxParse .spaceshow{
  86. display: none!important;
  87. /* white-space: pre; */
  88. }
  89. .wxParse .pre,
  90. .wxParse .tt,
  91. .wxParse .code,
  92. .wxParse .kbd,
  93. .wxParse .samp {
  94. font-family: monospace;
  95. }
  96. .wxParse .pre {
  97. overflow: auto;
  98. background: #f5f5f5;
  99. padding: 16upx;
  100. white-space: pre;
  101. margin: 1em 0upx;
  102. font-size: 24upx;
  103. }
  104. .wxParse .code {
  105. overflow: auto;
  106. padding: 16upx;
  107. white-space: pre;
  108. margin: 1em 0upx;
  109. background: #f5f5f5;
  110. font-size: 24upx;
  111. }
  112. .wxParse .big {
  113. font-size: 1.17em;
  114. }
  115. .wxParse .small,
  116. .wxParse .sub,
  117. .wxParse .sup {
  118. font-size: 0.83em;
  119. }
  120. .wxParse .sub {
  121. vertical-align: sub;
  122. }
  123. .wxParse .sup {
  124. vertical-align: super;
  125. }
  126. .wxParse .s,
  127. .wxParse .strike,
  128. .wxParse .del {
  129. text-decoration: line-through;
  130. }
  131. .wxParse .strong,
  132. .wxParse .s {
  133. display: inline;
  134. }
  135. .wxParse .a {
  136. color: deepskyblue;
  137. }
  138. .wxParse .video {
  139. text-align: center;
  140. margin: 22upx 0;
  141. }
  142. .wxParse .video-video {
  143. width: 100%;
  144. }
  145. .wxParse .uni-image{
  146. max-width: 100%;
  147. }
  148. /* .wxParse .img {
  149. display: block;
  150. max-width: 100%;
  151. margin-bottom: 0em;/* //与p标签底部padding同时修改 */
  152. /* overflow: hidden; */
  153. .wxParse .blockquote {
  154. margin: 10upx 0;
  155. padding: 22upx 0 22upx 22upx;
  156. font-family: Courier, Calibri, "宋体";
  157. background: #f5f5f5;
  158. border-left: 6upx solid #dbdbdb;
  159. }
  160. .wxParse .blockquote .p {
  161. margin: 0;
  162. }
  163. .wxParse .ul, .wxParse .ol {
  164. display: block;
  165. margin: 1em 0;
  166. padding-left: 2em;
  167. }
  168. .wxParse .ol {
  169. list-style-type: disc;
  170. }
  171. .wxParse .ol {
  172. list-style-type: decimal;
  173. }
  174. .wxParse .ol>weixin-parse-template,.wxParse .ul>weixin-parse-template {
  175. display: list-item;
  176. align-items: baseline;
  177. text-align: match-parent;
  178. }
  179. .wxParse .ol>.li,.wxParse .ul>.li {
  180. display: list-item;
  181. align-items: baseline;
  182. text-align: match-parent;
  183. }
  184. .wxParse .ul .ul, .wxParse .ol .ul {
  185. list-style-type: circle;
  186. }
  187. .wxParse .ol .ol .ul, .wxParse .ol .ul .ul, .wxParse .ul .ol .ul, .wxParse .ul .ul .ul {
  188. list-style-type: square;
  189. }
  190. .wxParse .u {
  191. text-decoration: underline;
  192. }
  193. .wxParse .hide {
  194. display: none;
  195. }
  196. .wxParse .del {
  197. display: inline;
  198. }
  199. .wxParse .figure {
  200. overflow: hidden;
  201. }
  202. .wxParse .table .table{
  203. border-collapse:collapse;
  204. box-sizing: border-box;
  205. /* 内边框 */
  206. border: 1px solid #dadada;
  207. width: 100%;
  208. }
  209. .wxParse .tbody{
  210. border-collapse:collapse;
  211. box-sizing: border-box;
  212. /* 内边框 */
  213. border: 1px solid #dadada;
  214. }
  215. .wxParse .thead, .wxParse .tfoot, .wxParse .th{
  216. border-collapse:collapse;
  217. box-sizing: border-box;
  218. background: #ececec;
  219. font-weight: 40;
  220. }
  221. .wxParse .tr {
  222. border-collapse:collapse;
  223. box-sizing: border-box;
  224. /* border: 2px solid #F0AD4E; */
  225. overflow:auto;
  226. }
  227. .wxParse .th,
  228. .wxParse .td{
  229. border-collapse:collapse;
  230. box-sizing: border-box;
  231. border: 2upx solid #dadada;
  232. overflow:auto;
  233. }
  234. .wxParse .audio, .wxParse .uni-audio-default{
  235. display: block;
  236. }