demo1.css 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. * {
  2. margin: 0;
  3. padding: 0;
  4. list-style: none;
  5. text-decoration: none;
  6. box-sizing: border-box;
  7. }
  8. /* 主体给宽不给高 */
  9. #contain {
  10. width: 100%;
  11. }
  12. /* 头部样式 */
  13. #header {
  14. width: 1260px;
  15. height: 75px;
  16. margin: 0 auto;
  17. overflow: hidden;
  18. }
  19. #header .logo {
  20. width: 149px;
  21. height: 45px;
  22. float: left;
  23. margin-top: 18px;
  24. background: url("../images/soso.png");
  25. background-position: -207px 0px
  26. }
  27. #header .nav {
  28. width: 352px;
  29. height: 75px;
  30. float: left;
  31. margin-left: 70px;
  32. line-height: 75px;
  33. position: relative;
  34. }
  35. #header .nav ul {
  36. overflow: hidden;
  37. }
  38. #header .nav ul li {
  39. float: left;
  40. margin-left: 33px;
  41. }
  42. #header .nav ul li:first-child {
  43. margin-left: 0;
  44. }
  45. #header .nav ul li:first-child a {
  46. color: #31ccff;
  47. }
  48. #header .nav ul li a {
  49. color: #000;
  50. font-size: 16px;
  51. }
  52. #header .nav ul li a:hover {
  53. color:#31ccff;
  54. }
  55. #header .nav .btn {
  56. width: 37px;
  57. height: 14px;
  58. color: #999999;
  59. background-color: #f5f7f9;
  60. border-radius: 8px;
  61. border: solid 1px #dddddd;
  62. text-align: center;
  63. line-height: 13px;
  64. font-size: 12px;
  65. position: absolute;
  66. top: 10px;
  67. right: 2px;
  68. }
  69. #header .login {
  70. width: 102px;
  71. height: 38px;
  72. float: right;
  73. margin-right: 10px;
  74. margin-top: 18px;
  75. border-radius: 3px;
  76. color: #fff;
  77. text-align: center;
  78. line-height: 38px;
  79. font-size: 16px;
  80. background: #1ebcf0;
  81. }
  82. #main {
  83. width: 100%;
  84. }
  85. #main .banner {
  86. width: 1920px;
  87. height: 482px;
  88. margin: 0 auto;
  89. }
  90. #main .banner .site {
  91. width: 1260px;
  92. height: 100%;
  93. margin: -488px auto 0;
  94. position: relative;
  95. /* 开启定位后 */
  96. z-index: 9;
  97. /* z-index: 999; */
  98. }
  99. #main .banner img {
  100. width: 1920px;
  101. height: 100%;
  102. }
  103. #main .banner .search {
  104. width: 692px;
  105. height: 58px;
  106. background: rgba(0,0,0,.2);
  107. overflow: hidden;
  108. position: absolute;
  109. top: 221px;
  110. left: 288px;
  111. /* margin: 0 auto; */
  112. padding:4px 2.5px;
  113. border-radius: 3px;
  114. }
  115. #main .banner .search input{
  116. width: 588px;
  117. height: 50px;
  118. float: left;
  119. font-size: 14px;
  120. padding: 10px;
  121. outline: none;
  122. border: 1px solid #adadad;
  123. border-top-left-radius: 3px;
  124. border-bottom-left-radius: 3px;
  125. /* background: #f00; */
  126. }
  127. #main .banner .search img{
  128. width: 98px;
  129. height: 50px;
  130. float: left;
  131. /* background: #f00; */
  132. }
  133. #main .card {
  134. width: 1260px;
  135. height: 450px;
  136. margin: 0 auto;
  137. overflow: hidden;
  138. padding-top: 108px;
  139. }
  140. #main .card .news {
  141. width: 290px;
  142. height: 100%;
  143. float: left;
  144. margin-left: 33px;
  145. position: relative;
  146. }
  147. #main .card .news:first-child {
  148. margin-left: 0;
  149. }
  150. #main .card dl {
  151. width: 290px;
  152. height: 250px;
  153. }
  154. #main .card dl dt{
  155. width: 290px;
  156. height: 200px;
  157. }
  158. #main .card dl dt img {
  159. width: 100%;
  160. height: 100%;
  161. }
  162. #main .card dl dd {
  163. overflow: hidden;
  164. margin-top: 37px;
  165. }
  166. #main .card dl dd p {
  167. width: 140px;
  168. height: 48px;
  169. color: #666;
  170. font-size: 12px;
  171. float: left;
  172. border:1px solid #dfdfdf;
  173. text-align: center;
  174. line-height: 48px;
  175. }
  176. #main .card dl dd p:last-child {
  177. float: right;
  178. }
  179. #main .card dl dd p:hover {
  180. color: #31ccff;
  181. }
  182. #main .card .news .title {
  183. width: 100%;
  184. height: 50px;
  185. color: #fff;
  186. text-align: center;
  187. line-height: 50px;
  188. font-size: 16px;
  189. position: absolute;
  190. top:151px;
  191. left: 0;
  192. display: none;
  193. background: rgba(0,0,0,.4);
  194. }
  195. #main .card .news dl dt:hover .title {
  196. display: block;
  197. }
  198. #main .area {
  199. width: 100%;
  200. height: 500px;
  201. background: #ff0;
  202. }
  203. #main .area .contain {
  204. width: 1260px;
  205. height: 100%;
  206. background: #00f;
  207. margin: 0 auto;
  208. }