demo2.css 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. 主体样式:给宽不给高
  3. */
  4. /* 通配符选择器 */
  5. * {
  6. /* 无序列表默认样式 */
  7. list-style: none;
  8. /* a标签默认样式 */
  9. text-decoration: none;
  10. }
  11. .content {
  12. width: 960px;
  13. height: 100%;
  14. }
  15. /* 头部样式 */
  16. .head {
  17. width: 100%;
  18. height: 55px;
  19. overflow: hidden;
  20. }
  21. .logo {
  22. width: 105px;
  23. height: 100%;
  24. float: left;
  25. }
  26. .search {
  27. width: 555px;
  28. height: 100%;
  29. float: left;
  30. }
  31. .search .input {
  32. width: 377px;
  33. height: 24px;
  34. margin-left: 169px;
  35. margin-top: 13px;
  36. outline: none;
  37. }
  38. .login {
  39. width: 300px;
  40. height: 100%;
  41. float: left;
  42. }
  43. .directory {
  44. margin-left: 144px;
  45. }
  46. .login .directory .btn {
  47. width: 50px;
  48. height: 42px;
  49. background: #eee;
  50. color: blue;
  51. display: inline-block;
  52. margin-left: 17px;
  53. text-align: center;
  54. line-height: 42px;
  55. font-size: 14px;
  56. }
  57. /* 主体样式 */
  58. .main {
  59. width: 100%;
  60. height: 500px;
  61. background: #f00;
  62. }
  63. /* 导航栏 */
  64. .nav {
  65. width: 100%;
  66. height: 42px;
  67. line-height: 42px;
  68. background: #00f;
  69. }
  70. .nav ul {
  71. overflow: hidden;
  72. margin-left: -39px;
  73. }
  74. .nav ul li {
  75. float: left;
  76. margin-left: 21px;
  77. }
  78. .nav ul li a {
  79. color: #fff;
  80. font-size: 17px;
  81. }
  82. .nav ul li a:hover {
  83. color: #f00;
  84. }
  85. /* 页尾样式 */
  86. .footer {
  87. width: 100%;
  88. height: 100px;
  89. background: #00f;
  90. }