Conditions | 1 |
Paths | 1 |
Total Lines | 258 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
1 | <?php |
||
290 | protected function SetCss() { |
||
291 | $this->aCss['default'] = ' |
||
292 | html, body, div, span, applet, |
||
293 | object, iframe, h1, h2, h3, h4, h5, h6, |
||
294 | p, blockquote, pre, a, abbr, acronym, |
||
295 | address, big, cite, code, del, dfn, em, |
||
296 | font, img, ins, kbd, q, s, samp, small, strike, |
||
297 | strong, sub, sup, tt, var, dd, dl, dt, |
||
298 | li, ol, ul, fieldset, form, label, legend, |
||
299 | table, caption, tbody, tfoot, thead, |
||
300 | tr, th, td { |
||
301 | margin: 0; |
||
302 | padding: 0; |
||
303 | border: 0; |
||
304 | font-weight: inherit; |
||
305 | font-style: inherit; |
||
306 | font-size: 100%; |
||
307 | line-height: 1.2em; |
||
308 | font-family: inherit; |
||
309 | text-align: left; |
||
310 | vertical-align: baseline; |
||
311 | } |
||
312 | |||
313 | a img, :link img, :visited img { |
||
314 | border: 0; |
||
315 | } |
||
316 | |||
317 | table { |
||
318 | border-collapse: collapse; |
||
319 | border-spacing: 0; |
||
320 | } |
||
321 | |||
322 | ol, ul { |
||
323 | list-style: none; |
||
324 | } |
||
325 | |||
326 | q:before, q:after, |
||
327 | blockquote:before, blockquote:after { |
||
328 | content: ""; |
||
329 | } |
||
330 | /* |
||
331 | 注意两点,这里定义了背景色和前景色,这是标准要求的,是网页可用性的一个基本方面,大家可以执行修改。 |
||
332 | |||
333 | 第二点,就是font-size的问题,为了让网页更好的支持网页缩放功能,应该使用em来替换px,这样会让ie6等上古浏览器也能良好的支持网页缩放。浏览器的默认字体高都是16px,所以未经调整的浏览器在显示1em=16px。换算过来的话也就是说1px=0.0625em,也就是12px =0.75em, 10px=0.625em,通过1px=0.0625em大家可以在CSS编写时通过px转换成em。 |
||
334 | */ |
||
335 | body {background-color: #FFFFFF;} |
||
336 | body, p, td, th, li |
||
337 | { |
||
338 | font-family: "宋体", verdana, helvetica, sans-serif; |
||
339 | font-size: 0.875em; |
||
340 | line-height: 1.5em; |
||
341 | color: #000000; |
||
342 | } |
||
343 | /* |
||
344 | -------- Styles come from other framework |
||
345 | My change |
||
346 | */ |
||
347 | h1, h2, h3 { |
||
348 | font-weight: bold; |
||
349 | font-family: "SimHei", inherit; |
||
350 | } |
||
351 | h1 { |
||
352 | font-size: 2em; |
||
353 | line-height: 3em; |
||
354 | } |
||
355 | h2 { |
||
356 | background-color: #8BB98B; |
||
357 | font-size: 1.5em; |
||
358 | line-height: 1.5em; |
||
359 | margin-bottom: 0.35em; |
||
360 | margin-left: 1em; |
||
361 | margin-right: 1em; |
||
362 | margin-top: 0.65em; |
||
363 | } |
||
364 | h3 { |
||
365 | font-size: 1.3em; |
||
366 | line-height: 2em; |
||
367 | margin-bottom: 0.1em; |
||
368 | margin-left: 1.154em; |
||
369 | margin-top: 0.2em; |
||
370 | } |
||
371 | h4, h5, h6 { |
||
372 | font-family: "FangSong", inherit; |
||
373 | font-size: 1.15em; |
||
374 | line-height: 2em; |
||
375 | margin-left: 1.364em; |
||
376 | } |
||
377 | p, td, th, li, dt, dd { |
||
378 | font-size: 1em; |
||
379 | line-height: 2em; |
||
380 | margin-left: 3em; |
||
381 | } |
||
382 | dt:after { |
||
383 | content: ":"; |
||
384 | } |
||
385 | dd { |
||
386 | margin-left: 6em; |
||
387 | } |
||
388 | pre { |
||
389 | margin-left: 5em; |
||
390 | } |
||
391 | th { |
||
392 | font-weight: bold; |
||
393 | text-align: center; |
||
394 | } |
||
395 | th, td { |
||
396 | padding-left: 0.5em; |
||
397 | padding-right: 0.5em; |
||
398 | } |
||
399 | /* |
||
400 | -------- Styles come from other framework |
||
401 | End |
||
402 | */ |
||
403 | |||
404 | |||
405 | body { |
||
406 | background-color: rgb(204, 232, 207); |
||
407 | } |
||
408 | code { |
||
409 | color: #900; |
||
410 | font-size: 1em; |
||
411 | } |
||
412 | abbr, acronym { |
||
413 | cursor: help; |
||
414 | } |
||
415 | |||
416 | /* Title and list */ |
||
417 | h1 { |
||
418 | text-align:center; |
||
419 | } |
||
420 | div.list { |
||
421 | line-height: 1.2em; |
||
422 | } |
||
423 | /* general unorder list */ |
||
424 | ul.gen li { |
||
425 | list-style-type: disc; |
||
426 | } |
||
427 | |||
428 | /* link color method 1 |
||
429 | a:hover, span.showhide_link:hover {background-color: #bcf; color: #f34;} */ |
||
430 | a { |
||
431 | text-decoration: none; |
||
432 | } |
||
433 | a:hover { |
||
434 | background-color: #b50394; |
||
435 | color: #fff; |
||
436 | } |
||
437 | |||
438 | #footer li{ |
||
439 | line-height: 1.5em; |
||
440 | margin-right: 1em; |
||
441 | text-align: center; |
||
442 | } |
||
443 | |||
444 | /* Version info */ |
||
445 | #verinfo { |
||
446 | display: none; |
||
447 | line-height: 1.2em; |
||
448 | background-color: #ded9af; |
||
449 | width: 50em; /* 需要根据内容大小适当调整 */ |
||
450 | border: solid black 1px; |
||
451 | position: absolute; |
||
452 | overflow: hidden; |
||
453 | z-index: 100; |
||
454 | margin: -1em 0em 0em 1em; |
||
455 | } |
||
456 | #verinfo pre{ |
||
457 | /*margin: 0em 0em 0em -2em;*/ |
||
458 | margin: 0em 0em 0em -2.5em; |
||
459 | } |
||
460 | #showhide_verinfo { |
||
461 | position: absolute; |
||
462 | top: 0.5em; left: 0.5em; |
||
463 | } |
||
464 | |||
465 | /* To solve problem: img tag in <a> have bgcolor. */ |
||
466 | a.img { |
||
467 | background-color: transparent !important; |
||
468 | background-color: #000; |
||
469 | } |
||
470 | |||
471 | /* Footer icon and copyright text. */ |
||
472 | div#footer img, div#footer span.spacer { |
||
473 | float: left; |
||
474 | margin-top: 0.2em; |
||
475 | } |
||
476 | div#footer ul#copyright { |
||
477 | float: right; |
||
478 | margin-right: 0%; |
||
479 | margin-top: 0%; |
||
480 | text-align: center; |
||
481 | } |
||
482 | hr { |
||
483 | border: 0px; |
||
484 | height: 1px; |
||
485 | color: #B0C4DE; |
||
486 | background-color: #B0C4DE; /* LightSteelBlue = #B0C4DE */ |
||
487 | } |
||
488 | #ads_bottom { |
||
489 | text-align: center; |
||
490 | } |
||
491 | |||
492 | |||
493 | /* Auto numbered list(article), usually used in doc */ |
||
494 | .article {counter-reset: c-level1} /* top c_lever need not reset */ |
||
495 | .article h2 {counter-reset: c-level2} |
||
496 | .article h3 {counter-reset: c-level3} |
||
497 | .article h4 {counter-reset: c-level4} |
||
498 | .article h2:before { |
||
499 | /*display: marker; */ |
||
500 | content: "§ " counter(c-level1, decimal) " "; |
||
501 | counter-increment: c-level1 1 |
||
502 | } |
||
503 | .article h3:before { |
||
504 | /*display: marker; */ |
||
505 | content: "§ " counter(c-level1) "." counter(c-level2, decimal) " "; |
||
506 | counter-increment: c-level2 1 |
||
507 | } |
||
508 | .article h4:before { |
||
509 | /*display: marker; */ |
||
510 | content: "§ " counter(c-level1) "." counter(c-level2, decimal) "." counter(c-level3, decimal) " "; |
||
511 | counter-increment: c-level3 1 |
||
512 | } |
||
513 | .article h5:before { |
||
514 | /*display: marker; */ |
||
515 | content: "§ " counter(c-level1) "." counter(c-level2, decimal) "." counter(c-level3, decimal) "." counter(c-level4, decimal) " "; |
||
516 | counter-increment: c-level4 1 |
||
517 | } |
||
518 | .article li { |
||
519 | list-style-type: disc; |
||
520 | margin-left: 6em; |
||
521 | } |
||
522 | .article table { |
||
523 | margin-left: 4em; |
||
524 | } |
||
525 | .article p { |
||
526 | text-indent: 2em; |
||
527 | } |
||
528 | /* p in li need not margin/indent, it will display as same as li */ |
||
529 | .article li p { |
||
530 | margin-left: 0em; |
||
531 | text-indent: 0em; |
||
532 | } |
||
533 | |||
534 | |||
535 | /* Temportary debug can apply this class */ |
||
536 | .debug { |
||
537 | border: 2px solid red; |
||
538 | } |
||
539 | |||
540 | |||
541 | /* Single line table in div, printable */ |
||
542 | .single_line table, .single_line td, .single_line th { |
||
543 | border: 1px solid black; |
||
544 | border-collapse: collapse; |
||
545 | } |
||
546 | '; |
||
547 | } // end of func SetCss |
||
548 | |||
752 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.