正常的项目当中,应当有一个common.css,就是把一些常用的样式,写入其中。

然后再结合一些特性的css,构造漂亮的页面。

下面欣赏一些海盗商城的common.css。

  1. /***样式初始化***/
  2. html {
  3. margin: 0;
  4. padding: 0;
  5. border: 0;
  6. -webkit-text-size-adjust: 100%;
  7. -ms-text-size-adjust: 100%;
  8. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  9. }
  10. body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, q, dl, dt, dd, ol, ul, li, input, fieldset, form, legend, caption, tbody, tfoot, thead, article, aside, dialog, figure, footer, header, hgroup, nav, section {
  11. margin: 0;
  12. padding: 0;
  13. border: 0;
  14. font-size: 14px;
  15. font: inherit;
  16. vertical-align: baseline;
  17. }
  18. article, aside, details, figcaption, figure, dialog, footer, header, hgroup, menu, nav, section {
  19. display: block;
  20. }
  21. body {
  22. font-size: 12px;
  23. color: #333;
  24. background: #fff;
  25. font-family: "Microsoft YaHei", "simsun", "Helvetica Neue", Arial, Helvetica, sans-serif;
  26. }
  27. img {
  28. border: 0;
  29. }
  30. ::-webkit-input-placeholder {
  31. color: #999;
  32. }
  33. :-moz-placeholder {
  34. color: #999;
  35. }
  36. ::-moz-placeholder {
  37. color: #999;
  38. }
  39. :-ms-input-placeholder {
  40. color: #ccc;
  41. }
  42. * {
  43. -webkit-box-sizing: border-box;
  44. -moz-box-sizing: border-box;
  45. box-sizing: border-box;
  46. }
  47. *:before, *:after {
  48. -webkit-box-sizing: border-box;
  49. -moz-box-sizing: border-box;
  50. box-sizing: border-box;
  51. }
  52. button::-moz-focus-inner, input::-moz-focus-inner {
  53. padding: 0;
  54. border: 0;
  55. }
  56. textarea {
  57. overflow: auto;
  58. }
  59. /*a{text-decoration: none;}*/
  60. b, strong {
  61. font-weight: bold;
  62. }
  63. input:focus, textarea:focus, button:focus, select:focus {
  64. outline: none;
  65. }
  66. input::-ms-clear {
  67. display: none;
  68. }
  69. button[disabled], html input[disabled] {
  70. cursor: default;
  71. }
  72. table {
  73. border-collapse: collapse;
  74. border-spacing: 0;
  75. }
  76. /*清除浮动*/
  77. .clearfix:after {
  78. visibility: hidden;
  79. display: block;
  80. font-size: 0;
  81. content: " ";
  82. clear: both;
  83. height: 0;
  84. }
  85. .clear {
  86. clear: both;
  87. }
  88. /***样式初始化 END***/
  89. /***float***/
  90. .fl {
  91. float: left !important;
  92. }
  93. .fr {
  94. float: right !important;
  95. }
  96. /***隐藏与显示***/
  97. .show {
  98. display: block !important;
  99. }
  100. .hidden {
  101. display: none !important;
  102. }
  103. .visible-hidden {
  104. visibility: hidden;
  105. }
  106. .over-initial {
  107. overflow: initial !important;
  108. }
  109. /***动画过渡时间***/
  110. .transition-0-3s {
  111. transition: all 0.3s;
  112. }
  113. .transition-0-5s {
  114. transition: all 0.5s;
  115. }
  116. .transition-0-8s {
  117. transition: all 0.8s;
  118. }
  119. .transition-1-0s {
  120. transition: all 1s;
  121. }
  122. .transition-1-5s {
  123. transition: all 1.5s;
  124. }
  125. .transition-2-0s {
  126. transition: all 2s;
  127. }
  128. .no-transition {
  129. transition: none !important;
  130. }
  131. /***文本类容***/
  132. /*标题*/
  133. h1, .h1 {
  134. font-size: 28px;
  135. }
  136. h2, .h2 {
  137. font-size: 24px;
  138. }
  139. h3, .h3 {
  140. font-size: 18px;
  141. }
  142. h4, .h4 {
  143. font-size: 16px;
  144. }
  145. h5, .h5 {
  146. font-size: 14px;
  147. }
  148. h6, .h6 {
  149. font-size: 12px;
  150. }
  151. h1 small, .h1 small, h2 small, .h2 small, h3 small, .h3 small {
  152. font-size: 60%;
  153. filter: alpha(opacity=60);
  154. opacity: .6;
  155. }
  156. h4 small, .h4 small, h5 small, .h5 small, h6 small, .h6 small {
  157. font-size: 12px;
  158. filter: alpha(opacity=60);
  159. opacity: .6;
  160. }
  161. /*自定义链接颜色(可自由更换)*/
  162. a {
  163. color: #333;
  164. text-decoration: none;
  165. }
  166. /*链接-颜色*/
  167. a:hover {
  168. color: #1380cb;
  169. }
  170. /*链接-悬浮颜色*/
  171. .text-underline:hover {
  172. text-decoration: underline;
  173. }
  174. /*段落*/
  175. p, .p {
  176. line-height: 25px;
  177. }
  178. .text-indent, .text-indent p, .text-indent div {
  179. text-indent: 2em;
  180. }
  181. /*粗体*/
  182. .strong {
  183. font-weight: bold;
  184. }
  185. .text-normal {
  186. font-weight: normal;
  187. }
  188. /*对齐*/
  189. .text-left {
  190. text-align: left !important;
  191. }
  192. .text-center {
  193. text-align: center !important;
  194. }
  195. .text-right {
  196. text-align: right !important;
  197. }
  198. .text-justify {
  199. text-align: justify !important;
  200. }
  201. /*文本省略*/
  202. .text-ellipsis {
  203. overflow: hidden;
  204. text-overflow: ellipsis;
  205. white-space: nowrap;
  206. }
  207. .no-ellipsis {
  208. overflow: auto;
  209. text-overflow: initial;
  210. white-space: normal;
  211. }
  212. /*字号*/
  213. .text-large {
  214. font-size: 24px !important;
  215. }
  216. .text-big {
  217. font-size: 16px !important;
  218. }
  219. .text-default {
  220. font-size: 14px !important;
  221. }
  222. .text-small {
  223. font-size: 12px !important;
  224. }
  225. .text-little {
  226. font-size: 10px !important;
  227. }
  228. /*字体颜色*/
  229. .text-main {
  230. color: #2a95de;
  231. }
  232. /*主色*/
  233. .text-sub {
  234. color: #1380cb;
  235. }
  236. /*辅色*/
  237. .text-dot {
  238. color: #ff5a00;
  239. }
  240. /*点缀色*/
  241. .text-mix {
  242. color: #d93600;
  243. }
  244. /*融合色*/
  245. .text-white {
  246. color: #fff;
  247. }
  248. /*白色*/
  249. .text-black {
  250. color: #000;
  251. }
  252. /*黑色*/
  253. .text-gray {
  254. color: #999;
  255. }
  256. /*浅灰色*/
  257. .text-drak-grey {
  258. color: #3a3a3a;
  259. }
  260. /*深灰色*/
  261. .text-red {
  262. color: #b10;
  263. }
  264. .text-orange {
  265. color: #f60;
  266. }
  267. .text-blue {
  268. color: #0ae;
  269. }
  270. .text-green {
  271. color: green;
  272. }
  273. /*行高*/
  274. .text-lh-little {
  275. line-height: 16px;
  276. }
  277. .text-lh-small {
  278. line-height: 18px;
  279. }
  280. .text-lh {
  281. line-height: 22px;
  282. }
  283. .text-lh-big {
  284. line-height: 24px;
  285. }
  286. .text-lh-large {
  287. line-height: 28px;
  288. }
  289. /***input***/
  290. .input {
  291. font-size: 14px;
  292. padding: 6px;
  293. border: solid 1px #ccc;
  294. width: 100%;
  295. height: 34px;
  296. line-height: 20px;
  297. display: block;
  298. background-color: #fff;
  299. -webkit-appearance: none;
  300. /*transition:all 1s;*/
  301. }
  302. .input:focus, .input-focus {
  303. border-color: #2a95de;
  304. background-color: #f5f8fd;
  305. /*transition:all 0.3s*/
  306. }
  307. .input:hover, .input-hover {
  308. border-color: #2a95de;
  309. }
  310. .input-error, .input-error:hover {
  311. border-color: #d93600;
  312. }
  313. .input-error:focus {
  314. border-color: #d93600;
  315. background-color: #fff;
  316. }
  317. .input-disabled, .input-disabled:hover, .input[disabled], .input[disabled]:hover {
  318. border-color: #999;
  319. background-color: #eee;
  320. }
  321. .input-readonly, .input[readonly], .input[readonly]:hover {
  322. border-color: #ccc;
  323. background-color: #fff;
  324. }
  325. /***Button***/
  326. .button {
  327. display: inline-block;
  328. padding: 6px 20px;
  329. border: 1px solid #ddd;
  330. border-radius: 3px;
  331. color: #3a3a3a;
  332. font-size: 12px;
  333. line-height: 22px;
  334. text-align: center;
  335. background: transparent;
  336. /*transition: all 0.3s;*/
  337. cursor: pointer;
  338. }
  339. .button-full {
  340. display: block;
  341. width: 100%;
  342. }
  343. .button:hover {
  344. background: #f1f1f1;
  345. }
  346. .button.bg-black, .button.bg-dark-grey, .button.bg-main, .button.bg-dot, .button.bg-gray, .button.bg-light-gray, .button.bg-sub, .button.bg-mix, .button.bg-pink, .button.bg-red, .button.bg-orange, .button.bg-blue, .button.bg-green {
  347. color: #fff;
  348. border: 0;
  349. }
  350. .button.bg-black:hover {
  351. background: #222;
  352. }
  353. .button.bg-dark-grey:hover {
  354. background: #444;
  355. }
  356. .button.bg-main:hover {
  357. background: #1380cb;
  358. }
  359. .button.bg-dot:hover {
  360. background: #d93600;
  361. }
  362. .button.bg-gray:hover {
  363. background: #aaa;
  364. }
  365. .button.bg-light-gray:hover {
  366. background: #aaa;
  367. }
  368. .button.bg-sub:hover {
  369. background: #2a95de;
  370. }
  371. .button.bg-mix:hover {
  372. background: #ff5a00;
  373. }
  374. .button.bg-white:hover {
  375. background: #f1f1f1;
  376. }
  377. .button.bg-gray-white:hover {
  378. background: #fff;
  379. }
  380. .button.bg-pink:hover {
  381. background: #e13538;
  382. }
  383. .button.bg-red:hover {
  384. background: #d10;
  385. }
  386. .button.bg-orange:hover {
  387. background: #f60;
  388. }
  389. .button.bg-blue:hover {
  390. background: #0ae;
  391. }
  392. .button.bg-green:hover {
  393. background: green;
  394. }
  395. .button.border-gray:hover, .button.border-main:hover, .button.border-dot:hover, .button.border-mix:hover, .button.border-sub:hover, .button.border-black:hover {
  396. color: #fff;
  397. }
  398. .button.border-gray-white:hover {
  399. background: #eee;
  400. }
  401. .button.border-light-gray:hover {
  402. background: #ccc;
  403. }
  404. .button.border-gray:hover {
  405. background: #999;
  406. }
  407. .button.border-black:hover {
  408. background: #000;
  409. }
  410. .button.border-main:hover {
  411. background: #2a95de;
  412. }
  413. .button.border-sub:hover {
  414. background: #1380cb;
  415. }
  416. .button.border-mix:hover {
  417. background: #d93600;
  418. }
  419. .button.border-dot:hover {
  420. background: #ff5a00;
  421. }
  422. /***select***/
  423. .select {
  424. width: 100%;
  425. height: 26px;
  426. border: 1px solid #ccc;
  427. }
  428. .select:focus, .select:hover {
  429. border-color: #2a95de;
  430. }
  431. /***textarea***/
  432. .textarea {
  433. border: 1px solid #ccc;
  434. resize: none;
  435. }
  436. .textarea:hover {
  437. border-color: #2a95de;
  438. }
  439. .textarea:focus {
  440. border-color: #2a95de;
  441. background-color: #f5f8fd;
  442. }
  443. /***margin***/
  444. /***border***/
  445. .border {
  446. border: solid 1px #ddd;
  447. }
  448. .border-top {
  449. border-top: solid 1px #ddd;
  450. }
  451. .border-right {
  452. border-right: solid 1px #ddd;
  453. }
  454. .border-bottom {
  455. border-bottom: solid 1px #ddd;
  456. }
  457. .border-left {
  458. border-left: solid 1px #ddd;
  459. }
  460. .border-top-bottom {
  461. border-top: solid 1px #ddd;
  462. border-bottom: solid 1px #ddd;
  463. }
  464. .border-left-right {
  465. border-left: solid 1px #ddd;
  466. border-right: solid 1px #ddd;
  467. }
  468. /*边框样式*/
  469. .border-dashed {
  470. border-style: dashed;
  471. }
  472. .border-dotted {
  473. border-style: dotted;
  474. }
  475. .border-double {
  476. border-style: double;
  477. }
  478. .border-inset {
  479. border-style: inset;
  480. }
  481. .border-outset {
  482. border-style: outset;
  483. }
  484. /*边框大小*/
  485. .border-large {
  486. border-width: 10px;
  487. }
  488. .border-big {
  489. border-width: 5px;
  490. }
  491. .border-middle {
  492. border-width: 3px;
  493. }
  494. .border-small {
  495. border-width: 2px;
  496. }
  497. .border-none {
  498. border: none !important;
  499. }
  500. /*边框颜色*/
  501. .border-gray-white {
  502. border-color: #eee;
  503. }
  504. .border-light-gray {
  505. border-color: #ccc;
  506. }
  507. .border-gray {
  508. border-color: #999;
  509. }
  510. .border-main {
  511. border-color: #2a95de;
  512. }
  513. .border-sub {
  514. border-color: #1380cb;
  515. }
  516. .border-mix {
  517. border-color: #d93600;
  518. }
  519. .border-dot {
  520. border-color: #ff5a00;
  521. }
  522. .border-white {
  523. border-color: #fff;
  524. }
  525. .border-black {
  526. border-color: #000;
  527. }
  528. /***border radius***/
  529. .radius-none {
  530. border-radius: 0;
  531. }
  532. .radius-small {
  533. border-radius: 2px;
  534. }
  535. .radius {
  536. border-radius: 4px;
  537. }
  538. .radius-big {
  539. border-radius: 6px;
  540. }
  541. .radius-rounded {
  542. border-radius: 2em;
  543. }
  544. .radius-circle {
  545. border-radius: 50%;
  546. }
  547. /***boxshadow***/
  548. .box-shadow {
  549. box-shadow: 0 3px 5px #ccc;
  550. }
  551. /***background***/
  552. .bg {
  553. background: #eee;
  554. }
  555. .bg-gray {
  556. background: #999;
  557. }
  558. .bg-dark-grey {
  559. background: #3a3a3a;
  560. }
  561. .bg-black {
  562. background: #000;
  563. }
  564. .bg-white {
  565. background: #fff;
  566. }
  567. .bg-gray-white {
  568. background: #f7f7f7;
  569. }
  570. .bg-main {
  571. background: #2a95de;
  572. }
  573. .bg-sub {
  574. background: #1380cb;
  575. }
  576. .bg-mix {
  577. background: #d93600;
  578. }
  579. .bg-dot {
  580. background: #ff5a00;
  581. }
  582. .bg-pink {
  583. background: #e13538;
  584. }
  585. .bg-red {
  586. background: #d10;
  587. }
  588. .bg-orange {
  589. background: #f60;
  590. }
  591. .bg-blue {
  592. background: #0ae;
  593. }
  594. .bg-green {
  595. background: green;
  596. }
  597. .bg-inverse, .bg-inverse a {
  598. color: #fff;
  599. }
  600. .bg-none {
  601. background: none !important;
  602. }
  603. .bg-light-red {
  604. background: #f00;
  605. }
  606. /*内边距,全,上,下,左,右*/
  607. .padding-large {
  608. padding: 30px;
  609. }
  610. .padding-large-top {
  611. padding-top: 30px;
  612. }
  613. .padding-large-right {
  614. padding-right: 30px;
  615. }
  616. .padding-large-bottom {
  617. padding-bottom: 30px;
  618. }
  619. .padding-large-left {
  620. padding-left: 30px;
  621. }
  622. .padding-big {
  623. padding: 20px;
  624. }
  625. .padding-big-top {
  626. padding-top: 20px;
  627. }
  628. .padding-big-right {
  629. padding-right: 20px;
  630. }
  631. .padding-big-bottom {
  632. padding-bottom: 20px;
  633. }
  634. .padding-big-left {
  635. padding-left: 20px;
  636. }
  637. .padding {
  638. padding: 10px;
  639. }
  640. .padding-tb {
  641. padding: 10px 0;
  642. }
  643. .padding-lr {
  644. padding: 0 10px;
  645. }
  646. .padding-top {
  647. padding-top: 10px;
  648. }
  649. .padding-right {
  650. padding-right: 10px;
  651. }
  652. .padding-bottom {
  653. padding-bottom: 10px;
  654. }
  655. .padding-left {
  656. padding-left: 10px;
  657. }
  658. .padding-small {
  659. padding: 5px;
  660. }
  661. .padding-small-top {
  662. padding-top: 5px;
  663. }
  664. .padding-small-right {
  665. padding-right: 5px;
  666. }
  667. .padding-small-bottom {
  668. padding-bottom: 5px;
  669. }
  670. .padding-small-left {
  671. padding-left: 5px;
  672. }
  673. .padding-little {
  674. padding: 2px;
  675. }
  676. .padding-little-top {
  677. padding-top: 2px;
  678. }
  679. .padding-little-right {
  680. padding-right: 2px;
  681. }
  682. .padding-little-bottom {
  683. padding-bottom: 2px;
  684. }
  685. .padding-little-left {
  686. padding-left: 2px;
  687. }
  688. .padding-none {
  689. padding: 0 !important;
  690. }
  691. /*外边距,全,上,下,左,右*/
  692. .margin-large {
  693. margin: 30px;
  694. }
  695. .margin-large-top {
  696. margin-top: 30px;
  697. }
  698. .margin-large-right {
  699. margin-right: 30px;
  700. }
  701. .margin-large-bottom {
  702. margin-bottom: 30px;
  703. }
  704. .margin-large-left {
  705. margin-left: 30px;
  706. }
  707. .margin-big {
  708. margin: 20px;
  709. }
  710. .margin-big-top {
  711. margin-top: 20px;
  712. }
  713. .margin-big-right {
  714. margin-right: 20px;
  715. }
  716. .margin-big-bottom {
  717. margin-bottom: 20px;
  718. }
  719. .margin-big-left {
  720. margin-left: 20px;
  721. }
  722. .margin {
  723. margin: 10px !important;
  724. clear: both;
  725. }
  726. .margin-tb {
  727. margin: 10px 0;
  728. }
  729. .margin-lr {
  730. margin: 0 10px;
  731. }
  732. .margin-top {
  733. margin-top: 10px;
  734. }
  735. .margin-right {
  736. margin-right: 10px;
  737. }
  738. .margin-bottom {
  739. margin-bottom: 10px;
  740. }
  741. .margin-left {
  742. margin-left: 10px;
  743. }
  744. .margin-around {
  745. margin: 0 10px;
  746. }
  747. .margin-small {
  748. margin: 5px;
  749. }
  750. .margin-small-top {
  751. margin-top: 5px;
  752. }
  753. .margin-small-right {
  754. margin-right: 5px;
  755. }
  756. .margin-small-bottom {
  757. margin-bottom: 5px;
  758. }
  759. .margin-small-left {
  760. margin-left: 5px;
  761. }
  762. .margin-little {
  763. margin: 2px;
  764. }
  765. .margin-little-top {
  766. margin-top: 2px;
  767. }
  768. .margin-little-right {
  769. margin-right: 2px;
  770. }
  771. .margin-little-bottom {
  772. margin-bottom: 2px;
  773. }
  774. .margin-little-left {
  775. margin-left: 2px;
  776. }
  777. .margin-none {
  778. margin: 0 !important;
  779. }
  780. /*无序有序列表*/
  781. ul {
  782. list-style: none;
  783. }
  784. ol {
  785. padding-left: 24px;
  786. }
  787. .list-cn {
  788. list-style-type: cjk-ideographic;
  789. }
  790. .list-alpha {
  791. list-style-type: upper-alpha;
  792. }
  793. .list-unstyle {
  794. list-style: none;
  795. padding-left: 0;
  796. }
  797. .list-unstyle ul {
  798. list-style: disc;
  799. }
  800. .list-inline li {
  801. display: inline-block;
  802. padding: 0 10px;
  803. width: auto;
  804. }
  805. /***布局***/
  806. .layout {
  807. width: 100%;
  808. }
  809. .container {
  810. margin: 0 auto;
  811. width: 1200px;
  812. }
  813. /*宽度比例*/
  814. .w10 {
  815. width: 10%;
  816. }
  817. .w20 {
  818. width: 20%;
  819. }
  820. .w30 {
  821. width: 30%;
  822. }
  823. .w40 {
  824. width: 40%;
  825. }
  826. .w50 {
  827. width: 50%;
  828. }
  829. .w60 {
  830. width: 60%;
  831. }
  832. .w70 {
  833. width: 70%;
  834. }
  835. .w80 {
  836. width: 80%;
  837. }
  838. .w90 {
  839. width: 90%;
  840. }
  841. .w5 {
  842. width: 5%;
  843. }
  844. .w15 {
  845. width: 15%;
  846. }
  847. .w25 {
  848. width: 25%;
  849. }
  850. .w35 {
  851. width: 35%;
  852. }
  853. .w45 {
  854. width: 45%;
  855. }
  856. .w55 {
  857. width: 55%;
  858. }
  859. .w65 {
  860. width: 65%;
  861. }
  862. .w75 {
  863. width: 75%;
  864. }
  865. .w85 {
  866. width: 85%;
  867. }
  868. .w95 {
  869. width: 95%;
  870. }
  871. /*HR*/
  872. .hr-gray {
  873. width: 100%;
  874. border-top: 1px solid #d6d6d6;
  875. border-bottom: 1px solid #fff;
  876. }
  877. .hr-black {
  878. width: 100%;
  879. border-top: 1px solid #171717;
  880. border-bottom: 1px solid #707070;
  881. }
  882. .hr-blue {
  883. width: 100%;
  884. border-top: 1px solid #2969a6;
  885. border-bottom: 1px solid #488bcb;
  886. }
  887. /*spacer*/
  888. .spacer-gray {
  889. border-left: 1px solid #d6d6d6;
  890. border-right: 1px solid #fff;
  891. }
  892. /*广告*/
  893. .roof {
  894. width: 1200px;
  895. height: 90px;
  896. overflow: hidden;
  897. margin: 0 auto;
  898. display: none;
  899. }
  900. .mask {
  901. opacity: 0.7;
  902. position: fixed;
  903. left: 0px;
  904. top: 0px;
  905. width: 100%;
  906. height: 100%;
  907. overflow: hidden;
  908. z-index: 1030;
  909. background: rgb(0, 0, 0);
  910. display: none;
  911. overflow: hiden;
  912. }
  913. .ads {
  914. position: absolute;
  915. top: 23%;
  916. left: 23%;
  917. }
  918. .ads a {
  919. position: absolute;
  920. top: 0;
  921. right: 0;
  922. }
  923. /* 订单支付 */
  924. .order-container .border, .pay-checkbox:hover {
  925. cursor: pointer;
  926. }

类名称通俗易懂,样式多样且全面。支持各种手机端布局。很棒。值得借鉴。

common.css 值得学习的css样式布局的更多相关文章

  1. 值得学习的CSS知识

    这里零度给大家推荐几个值得学习的CSS技巧,能让你编写网页事半功倍!一.清除默认值 通常 padding 的默认值为 0,background-color 的默认值是 transparent.但是在不 ...

  2. 微信小程序开发:学习笔记[4]——样式布局

    微信小程序开发:学习笔记[4]——样式布局 Flex布局 新的布局方式 在小程序开发中,我们需要考虑各种尺寸终端设备上的适配.在传统网页开发,我们用的是盒模型,通过display:inline | b ...

  3. css案例学习之层叠样式

    代码 <html> <head> <title>层叠特性</title> <style type="text/css"> ...

  4. (3)《Head First HTML与CSS》学习笔记---CSS入门

    1.O‘Reilly的<CSS PocketReference>是一本不错的CSS参考小书,记录了常用的元素属性. 2.元素选择器的作用强于继承的作用:用户定义强于浏览器默认(以下所有讨论 ...

  5. CSS基础学习 21.CSS居中总结

    注意:*在IE中并不代表通配符的意思,是代表根元素的意思,所以为了匹配适应各种浏览器,进行页面初始化 <style> *{ margin:0; padding:0; } </styl ...

  6. CSS基础学习-2.CSS选择器(上)

    元素选择符 关系选择符 属性选择符 伪类选择符 伪对象选择符 一.元素选择符 1.通配符:*{ } 2.类选择符:.类名称{ } 3.id选择符::#id名称{ } 4.类型选择符(标签选择符):标签 ...

  7. CSS基础学习 20.CSS媒体查询

  8. CSS基础学习 19.CSS hack

  9. CSS基础学习 18.CSS多列

    四种常见的浏览器内核:

随机推荐

  1. Map 对象

    1.创建一个Map对象 var map=new Map(); 2.size属性 //给map添加一些值 map.set("name","张三"); map.se ...

  2. 07_控制线程_join_线程插队

    [join线程简述] join()方法:Thread提供的让一个线程去等待另一个线程完成.当在某个程序执行流中(如main线程)调用其它线程(如t2线程)的join方法(t2.join()),调用线程 ...

  3. 01_SpringMVC流程架构图

    [组件说明] 以下组件通常使用框架提供实现: 1.DisPatcherServlet:前端控制器(不需要程序员开发) 用户请求到达前端控制器,它相当于MVC模式中的C(Controller),Disp ...

  4. Android_Chronometer计时器

    最近做一个项目用到Handler 和Message ,开始时不是很明白,不了解其中的内部机制,所以开发起来有点难度,之后自己找了Android 时间服务 这一节的内容,总结了一点关于时间的知识,在这里 ...

  5. discuz 重新定义jquery的$

    最近做个小插件 发现加了这个代码不执行: $.ajax({ url:'plugin.php?id=register:regeist_jiangsu', type:'post', data:{ 'mob ...

  6. 《C和指针》读书笔记——第二章 基本概念

    1.编译过程: source code→Compiler→Object code→Linker←Lib ↓ Exe 2.经过初始化的静态变量(static)在程序执行前能获得他们的值. 3.绝大多数环 ...

  7. codeforces edu round3

    B. The Best Gift  传送门:http://codeforces.com/problemset/problem/609/B Emily's birthday is next week a ...

  8. 【已解决】Vmware无法创建虚拟网卡的问题

    最近因为各种需要,要在虚拟机里使用桥接方式连接.但是不管怎么操作,都无法添加虚拟网卡.连续好多天需要用到桥接上网,今儿多方搜索,找到了解决方案. 参考资料:http://tieba.baidu.com ...

  9. android正在运行进程和后台缓存进程的区别

    正在运行的进程:需要占用一定的cpu资源和RAM(内存)空间,多少的话看是什么应用,要消耗一定的电量,影响手机速度等性能. 后台缓存的进程:不需要占用cpu资源,会在RAM中写入一部分数据,当下次打开 ...

  10. Java练习题

    1.实现一个类似于ConcurrentHashMap的分段加锁 import java.util.HashMap; import java.util.Map; import java.util.con ...