1. /* 清除默认样式 */
    2. *{
    3. margin: 0;
    4. padding: 0;
    5. }
    6. /* 顶层topbar块容器 */
    7. .topbar{
    8. min-width: 1190px;
    9. height: 30px;
    10. background-color: gray;
    11. border-bottom: 1px solid #ddd;
    12. }
    13. /* 清除项目符号 */
    14. ul{
    15. list-style: none;
    16. }
    17. /* 定宽 */
    18. .w{
    19. width: 1190px;
    20. margin: 0 auto: ;;
    21. }
    22. /* 内部的容器 */
    23. .topbar .inner{
    24. height: 30px;
    25. line-height: 30px;
    26. }
    27. /* 设置菜单*/
    28. .city{
    29. float: left;
    30. position: relative;
    31. }
    32. .city:hover .down{
    33. display: block;
    34. }
    35. .city:hover .up{
    36. background-color: greenyellow;
    37. height: 29px;
    38. padding-bottom: 2px;
    39. background-color: white;
    40. border: 1px rgb(204,204,204) solid;
    41. border-bottom: none;
    42. position: relative;
    43. top: 30px;
    44. }
    45. .city:hover .up a{
    46. }
    47. .city .down{
    48. width: 200px;
    49. height: 300px;
    50. background-color: yellow;
    51. display: none;
    52. position: absolute;
    53. border: 1px solid #ddd;
    54. box-shadow: 0 0 10px rgba(0,0,0,.5);
    55. }
    56. .shortcut{
    57. float: right;
    58. }
    59. /* 设置菜单浮动 */
    60. .shortcut li{
    61. float: left;
    62. }
    63. /* 设置链接文字的样式 */
    64. .top-bar a{
    65. font: 12px/1.5 'microsoft Yahei','Heiti SC',sans-serif;
    66. color: #999;
    67. text-decoration: none;
    68. }
    69. /* 设置线条 */
    70. .line{
    71. height: 10px;
    72. width: 1px;
    73. background-color: red;
    74. float: left;
    75. margin: 12px 10px 0px;
    76. }