css - 公众号样式

  1 /*
  2  * @Author: WJ_LONG 
  3  * @Date: 2018-09-06 15:32:06 
  4  * @Last Modified by: WJ_LONG
  5  * @Last Modified time: 2018-09-07 16:18:09
  6  * @animation-display-address:https://daneden.github.io/animate.css/ || http://ianlunn.github.io/Hover/
  7  * @Use 公众号
  8  */
  9 
 10 @charset "utf-8";
 11 /*
 12 
 13 这里可以用import导入各种库....
 14 
 15 例如:import "./animate.min.css";
 16 
 17 */
 18 
 19 * {
 20   box-sizing: border-box;
 21 }
 22 
 23 a {
 24   color: #2d374b;
 25   text-decoration: none
 26 }
 27 
 28 a:hover {
 29   color: #cd0200;
 30   text-decoration: underline
 31 }
 32 
 33 em {
 34   font-style: normal
 35 }
 36 
 37 li {
 38   list-style: none
 39 }
 40 
 41 img {
 42   border: 0;
 43   vertical-align: middle
 44 }
 45 
 46 table {
 47   border-collapse: collapse;
 48   border-spacing: 0
 49 }
 50 
 51 p {
 52   word-wrap: break-word
 53 }
 54 
 55 /* 文字 */
 56 
 57 .t-white {
 58   color: #fff;
 59 }
 60 
 61 .t-black {
 62   color: #000;
 63 }
 64 
 65 .t-blue {
 66   color: #0E639C;
 67 }
 68 
 69 .t-red {
 70   color: #DD4F43;
 71 }
 72 
 73 .t-green {
 74   color: #1AA15F;
 75 }
 76 
 77 .t-yellow {
 78   color: #FFCD42;
 79 }
 80 
 81 .t-orange {
 82   color: #f18518;
 83 }
 84 
 85 .t-bold {
 86   font-weight: bold;
 87 }
 88 
 89 .t-left {
 90   text-align: left;
 91 }
 92 
 93 .t-center {
 94   text-align: center;
 95 }
 96 
 97 .t-right {
 98   text-align: right;
 99 }
100 
101 /* 文字换行与不换行 */
102 
103 .n-word {
104   word-break: break-all;
105 }
106 
107 .no-word {
108   word-break: nowrap;
109 }
110 
111 /* 背景 */
112 
113 .bg-blue {
114   background-color: #038dd8;
115 }
116 
117 .bg-green {
118   background-color: #009b4d;
119 }
120 
121 .bg-yellow {
122   background-color: #fdd100;
123 }
124 
125 .bg-orange {
126   background-color: #f18518;
127 }
128 
129 .bg-red {
130   background-color: #d22a31;
131 }
132 
133 /* 图标 > */
134 
135 .icon-direction {
136   width: 1.2em;
137   height: 1.2em;
138   padding: 0;
139   margin: 0;
140   border: 1px solid #000;
141   border-top: none;
142   border-left: none;
143   transform: rotate(-45deg);
144 }
145 
146 /* 遮罩层-垂直居中 */
147 
148 .ab-center {
149   display: flex;
150   justify-content: center;
151   align-items: center;
152   position: absolute;
153   top: 0;
154   bottom: 0;
155   left: 0;
156   right: 0;
157   background-color: rgba(0, 0, 0, .7);
158 }
159 
160 /* 美化input */
161 
162 /* <div class="beautiful">
163 <div class="radio">
164     <input type="radio" name="Storage" id="model1" checked/>
165     <label for="model1">iPhone 6s</label>
166     <input type="radio" name="Storage" id="model2" />
167     <label for="model2">iPhone 6s Plus</label>
168     <input type="radio" name="Storage" id="model3" />
169     <label for="model3">iPhone 7</label>
170     <input type="radio" name="Storage" id="model4" />
171     <label for="model4">iPhone 7 Plus</label>
172 </div>
173 
174 <br>
175 
176 <div class="checkbox">
177     <input type="checkbox" id="love1" />
178     <label for="love1">女</label>
179     <input type="checkbox" id="love2" />
180     <label for="love2">绘画</label>
181     <input type="checkbox" id="love3" />
182     <label for="love3">摄影</label>
183     <input type="checkbox" id="love4" checked />
184     <label for="love4">骑行</label>
185 </div>
186 </div> */
187 
188 .beautiful input {
189   display: none
190 }
191 
192 .beautiful label {
193   border: 1px solid #00a4ff;
194   padding: 2px 10px 2px 5px;
195   line-height: 28px;
196   min-width: 80px;
197   text-align: center;
198   float: left;
199   margin: 2px;
200   border-radius: 4px
201 }
202 
203 .beautiful input:checked+label {
204   background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MiA0MiI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGZpbGw9IiMwMGE0ZmYiIGQ9Ik00MiA0MlYuNUwuNSA0MnoiLz48cGF0aCBkPSJNMTkuNCAyNi45bDguNSA4LjUtMi45IDIuOC04LjUtOC41IDIuOS0yLjh6bTE3LTUuN2wyLjggMi44LTE0LjEgMTQuMi0yLjgtMi44IDE0LjEtMTQuMnoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=) no-repeat right bottom;
205   background-size: 21px 21px;
206   color: #00a4ff;
207 }
208 
209 .beautiful .radio, .beautiful .checkbox {
210   height: 2em;
211 }
212 
213 /* tab选项卡 */
214 
215 /* tab选项卡示例代码 */
216 
217 /* <ul class="tabs t-white">
218 <li>
219     <input type="radio" name="tabs" id="tab1" checked />
220     <label for="tab1" class="bg-green">导航1</label>
221     <div id="tab-content1" class="tab-content bg-green">
222         <p>选项卡内容 1fd;lafklsakfldskflaksldfklsa</p>
223     </div>
224 </li>
225 
226 <li>
227     <input type="radio" name="tabs" id="tab2" />
228     <label for="tab2">导出2</label>
229     <div id="tab-content2" class="tab-content bg-green">
230         <p>选项卡内容211f2dsa1f2sa1df2sa1fdsa2fsafdsfsafdsa</p>
231     </div>
232 </li>
233 
234 </ul> */
235 
236 .tabs {
237   width: 100%;
238   float: none;
239   list-style: none;
240   position: relative;
241 }
242 
243 .tabs li {
244   float: left;
245   width: calc(100%/2);
246   margin-top: -1%;
247   text-align: center;
248 }
249 
250 .tabs input[type="radio"] {
251   position: absolute;
252   left: -9999px;
253 }
254 
255 .tabs label {
256   display: block;
257   padding: 1.5em;
258   border-radius: 2px 2px 0 0;
259   font-weight: normal;
260   text-transform: uppercase;
261   cursor: pointer;
262   transition: all 0.2s ease-in-out;
263   background-color: #009b4d;
264   position: relative;
265   top: .35em;
266 }
267 
268 .tabs label:hover {
269   background-color: #017b3e;
270 }
271 
272 .tabs .tab-content {
273   z-index: 2;
274   display: none;
275   overflow: hidden;
276   width: 100%;
277   padding: 25px;
278   background-color: #009b4d;
279   position: absolute;
280   top: 1;
281   left: 0;
282 }
283 
284 .tabs [id^="tab"]:checked+label {
285   background-color: #017b3e;
286 }
287 
288 .tabs [id^="tab"]:checked~[id^="tab-content"] {
289   display: block;
290   text-align: left;
291 }
292 
293 /* 表格示例代码 */
294 
295 /* <div class='table'>
296   <div class='tr'>
297       <div class='th th1'>视频</div>
298       <div class='th th2'>游戏</div>
299       <div class='th th3'>电视</div>
300 
301   </div>
302 
303   <div class='tr'>
304       <div class='td td1'>1</div>
305       <div class='td td2'>2</div>
306       <div class='td td3'>3</div>
307   </div>
308 
309 
310 
311   <div class='tr'>
312       <div class='td td1'>1</div>
313       <div class='td td2'>2</div>
314       <div class='td td3'>3</div>
315   </div>
316 
317 
318   <div class='tr'>
319       <div class='td td1'>1</div>
320       <div class='td td2'>2</div>
321       <div class='td td3'>3</div>
322   </div>
323 </div> */
324 
325 .table {
326   width: 100%;
327 }
328 
329 .tr {
330   width: 100%;
331   display: flex;
332   justify-content: space-between;
333   border-bottom: 1px solid #dadada;
334 }
335 
336 .tr .th1 {
337   background-color: #008bd5;
338 }
339 
340 .tr .th2 {
341   background-color: #ee8236;
342 }
343 
344 .tr .th3 {
345   background-color: #a40081;
346 }
347 
348 .th, .td {
349   padding: 10px;
350   text-align: center;
351   width: 100%;
352 }
353 
354 .th {
355   background-color: #000;
356   font-size: 1.2em;
357   color: #fff;
358 }
359 
360 .td {
361   font-size: 0.9em;
362   color: #000;
363 }
364 
365 .td1, .td2, .td3 {
366   word-break: break-all;
367   white-space: normal;
368 }
369 
370 /* 边框 */
371 
372 .border-top {
373   border-top: 1px solid #000;
374 }
375 
376 .border-right {
377   border-right: 1px solid #000;
378 }
379 
380 .border-bottom {
381   border-bottom: 1px solid #000;
382 }
383 
384 .border-left {
385   border-left: 1px solid #000;
386 }
387 
388 .border {
389   border: 1px solid #000;
390 }
391 
392 /* 显示-隐藏 */
393 
394 .none {
395   display: none;
396 }
397 
398 .display {
399   display: block;
400 }
401 
402 .none-force {
403   display: none !important;
404 }
405 
406 /* 阴影(外部、内部阴影) */
407 
408 .b-shadow {
409   box-shadow: #fdd000 0 0 10px;
410 }
411 
412 .t-shadow {
413   text-shadow: #ec350c 0 0 20px;
414 }
415 
416 /* 宽度 */
417 
418 .w-100per {
419   width: 100%;
420 }
421 
422 .w-50per {
423   width: 50%;
424 }
425 
426 .h-100per {
427   height: 100%;
428 }
429 
430 .w-100vh {
431   width: 100vh;
432 }
433 
434 .h-100vh {
435   width: 100vh;
436 }
437 
438 /* 用户头像大小 */
439 
440 .u-80 {
441   height: 80rpx;
442   width: 80rpx;
443 }
444 
445 .u-50 {
446   height: 50rpx;
447   width: 50rpx;
448 }
449 
450 /* 圆角 */
451 
452 .b-radius-50per {
453   border-radius: 50%;
454 }
455 
456 .b-radius-10 {
457   border-radius: 10px;
458 }
459 
460 /* 
461   前三分为:中、开始(默认),结束
462  */
463 
464 .f {
465   display: flex;
466 }
467 
468 .f-center {
469   justify-content: center;
470 }
471 
472 .f-start {
473   justify-content: flex-start;
474 }
475 
476 .f-end {
477   justify-content: flex-end;
478 }
479 
480 .f-s-b {
481   justify-content: space-between;
482 }
483 
484 .f-s-a {
485   justify-content: space-around;
486 }
487 
488 .f-no-wrap {
489   flex-wrap: nowrap;
490 }
491 
492 .f-wrap {
493   flex-wrap: wrap;
494 }
495 
496 /*
497   垂直居中(针对view先的元素 - align)
498 */
499 
500 .f-align-c {
501   align-items: center;
502 }
503 
504 .f-align-s {
505   align-items: flex-start;
506 }
507 
508 .f-align-e {
509   align-items: flex-end;
510 }
511 
512 .f-algin-b {
513   align-items: baseline;
514 }
515 
516 .f-align-stretch {
517   align-items: stretch;
518 }
519 
520 /* line-block 和 inline */
521 
522 .i-line {
523   display: inline;
524 }
525 
526 .i-block {
527   display: inline-block;
528 }
529 
530 .block {
531   display: block;
532 }
533 
534 /* 定位 */
535 
536 .p-r {
537   position: relative;
538 }
539 
540 .p-s {
541   position: absolute;
542 }
543 
544 .p-f {
545   position: fixed;
546 }
547 
548 .over-flow {
549   overflow: hidden;
550 }
551 
552 /* 内边距 */
553 
554 .p-2per {
555   padding: 2%;
556 }
557 
558 .p-l-2per {
559   padding-left: 2%;
560 }
561 
562 .p-r-2per {
563   padding-right: 2%;
564 }
565 
566 .p-t-2per {
567   padding-top: 2%;
568 }
569 
570 .p-b-2per {
571   padding-bottom: 2%;
572 }
573 
574 /* 外边距 */
575 
576 .m-2per {
577   padding: 2%;
578 }
579 
580 .m-tb-2per {
581   margin: 2% 0;
582 }
583 
584 .m-lr-2per {
585   margin: 0 2%;
586 }
587 
588 .m-l-2per {
589   padding-left: 2%;
590 }
591 
592 .m-r-2per {
593   padding-right: 2%;
594 }
595 
596 .m-t-2per {
597   padding-top: 2%;
598 }
599 
600 .p-b-2per {
601   padding-bottom: 2%;
602 }

 

posted @ 2018-09-08 09:03  Sunsin  阅读(796)  评论(0编辑  收藏  举报