1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <template>
- <div style="width:100%;border-bottom: #f1f1f1 solid 1px;">
- <div class="header_box">
- <div class="header_left">
- <img src="../assets/image/resource/logo_img.png" class="logo_img" />
- <div class="header_list">
- <ul>
- <li v-for="items in navlist" class="nav_name"><a :href="items.url" style="color:#555;">{{items.name}}</a></li>
- </ul>
- </div>
- </div>
- <div class="header_right">
- <div class="helper" ><img src="../assets/image/resource/login_img.png" @click="tologin"/></div>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- navlist: [
- { "id": 1, "name": '首页', "url": '/HomePage' },
- { "id": 2, "name": '资源', "url": '/resource' },
- { "id": 3, "name": '名师', "url": '/Teacher' },
- { "id": 4, "name": '活动', "url": '/activity' },
- ],
- }
- },
- methods: {
- tologin: function () {
- this.$router.push({ path: '/login' })
- }
- }
- }
- </script>
- <style scoped>
- .header_box {
- width: 1200px;
- height: 85px;
- background-color: #fff;
- margin: 0 auto;
- }
- .header_left {
- width: 800px;
- float: left;
- height: 75px;
- }
- .header_right {
- width: 215px;
- float: right;
- height: 75px;
- padding-left:5%;
- padding-top:5px;
- }
- .logo_img {
- float: left;
- width: 177px;
- height:41px;
- margin-top: 22px;
- }
- .header_list {
- float: left;
- width:70%;
- padding-left:15%;
- }
- .nav_name {
- width: 15%;
- float: left;
- list-style: none;
- display: block;
- height: 38px;
- line-height: 85px;
- padding: 0 5px;
- margin: 0 11px;
- font-size: 18px;
- color: #555555;
- text-align:center;
- }
- .login_btn {
- width:30%;
- display:block;
- float:left;
- margin-left:40%;
- }
- .helper {
- width: 100%;
- height:58px;
- display: block;
- float: left;
- padding-top:15px;
- }
- .helper img {
- width:100%;
- }
- </style>
|