@charset "UTF-8"; * { padding: 0; margin: 0; font-size: 16px; font-family: "Helvetica Neue", serif; } /* 定义好背景 */ /* 配置头部导航 */ .head { width: 100vw; height: 80px; border-bottom: 2px #efefef solid; } .menu-logo { float: left; padding-left: 40px; } .menu-logo .logo { width: 100px; height: 80px; } /* logo */ /* menu */ .menu-item { padding-right: 40px; } .menu-item ul { float: right; list-style: none; display: block; } .menu-item ul li { margin: 0 30px; float: left; line-height: 80px; } .menu-item ul li a { color: #222222; text-decoration: none; } /* checkbox display none*/ #toggler{ display: none; } @media all and (max-width: 762px) { /* 汉堡导航样式 */ .check_button{ width: 40px; height: 40px; display: block; position: relative; float: right; right: 45px; top: 20px; text-align: center; cursor: pointer; } #toggler{ display: none; } /* 设置汉堡导航的导航条 */ .check_button span{ display: block; height: 2px; background-color: #000; position: relative; transition: transform .9s ease-in-out; top: 0; text-align: center; } .check_button span:nth-child(2){ margin-top: 7px; } .check_button span:nth-child(3){ margin-top: 7px; } .check_button span:nth-child(4){ margin-top: 7px; } #toggler:checked + label .check_button span:nth-child(1){ top: 10px; transition: top .2s ; /*ease-in-out, opacity .8s ease-in-out .4s;*/ height: 1px; } #toggler:checked + label .check_button span:nth-child(2){ top: 6px; transition: top .3s ; /*ease-in-out, opacity .8s ease-in-out .4s;*/ height: 1px; } #toggler:checked + label .check_button span:nth-child(3){ top: 3px; transition: top .4s ; /*ease-in-out, opacity .8s ease-in-out .4s;*/ height: 2px; } #toggler:checked + label .check_button span:nth-child(4){ top: 0; transition: top .6s ; /*ease-in-out, opacity .4s ease-in-out .4s;*/ height: 2px; } .menu-item{ background-color: rgba(239,239,239,0.92); width: 100%; height: 100vh; position: absolute; top: 82px; left: 0; transform: scaleY(0); transition: transform .7s ease-in-out, opacity .2s ease-in-out .2s; transform-origin: 50% 0; opacity: 0; z-index: 100; padding: 40px 4%; } #toggler:checked ~ .menu-item{ transform: scaleY(1); opacity: 1; } /* 定义汉堡导航后的结果。 */ .menu-list{ position: fixed; left: 0; } .menu-list li{ width: 300px; display: block; float: left; border-bottom: 3px #000 solid; } } @media (max-width: 1200px) { } /* 定义移动样式 */ .man{ background-color: #f6f6f6; margin: 0 auto; width: 90%; height: 60%; border-radius: 15px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,.12%); } .images{ height: 200px; } .images img{ width: 100%; display: block; height: inherit; } .title_content_box h1{ margin: 10px; padding: 5px; display: inline-block; font-family: "Helvetica Neue", serif; font-size: 40px; border-bottom: 1px #000000 solid; } [id="text"] p{ margin: 0 10px; font-weight: bold; } /* 定义PC样式 */