heat.css 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* https://www.bilibili.com/video/BV14J4114768?p=404&vd_source=f1f283d1bc4b954943a9148eb6f545f9 */
  2. body{
  3. /* 页面宽度占满手机 100% */
  4. width: 100%;
  5. /* 最小页面缩放,手机分辨率小于这个值,页面就不再缩放了 */
  6. min-width: 320px;
  7. /* 最大页面不超过 */
  8. max-width: 640px;
  9. margin: 0 auto;
  10. font-size: 14px;
  11. line-height: 1.5;
  12. color: #000;
  13. }
  14. .time{
  15. height: 45px;
  16. }
  17. ul{
  18. margin: 0;
  19. padding: 0;
  20. list-style: none;
  21. text-align: center;
  22. }
  23. ul li h1{
  24. color: #9e8201;
  25. }
  26. /* 后代元素选择器
  27. 语法: 祖先 后代 后代
  28. */
  29. .app ul li{
  30. /* 靠左浮动,这样他们才可以并排一行 */
  31. float: left;
  32. height: 45px;
  33. background-color: #333333;
  34. /* 文本居中 */
  35. text-align: center;
  36. line-height: 45px;
  37. }
  38. /* 伪类选择器,根据相同类型元素选择
  39. :first-of-type 同类型第一个子元素
  40. :nth-of-type(n) 同类型第n个子元素
  41. :nth-last-of-type(n) 同类型倒数第n个子元素
  42. */
  43. .app ul li:nth-child(1){
  44. width: 8%;
  45. }
  46. .app ul li:nth-child(2){
  47. width: 10%;
  48. }
  49. .app ul li:nth-child(3){
  50. width: 57%;
  51. }
  52. .app ul li:nth-child(4){
  53. width: 25%;
  54. }