Newer
Older
CloudBrainNew / src / components / TopMenu2.vue
StephanieGitHub on 4 Feb 2021 1 KB first commit
<template>
  <div class="fixTopBox">
    <vue-scroll ref="vs">
      <div class="topContaion">
        <div class="topBox">
          <div class="topTitle">
            <img :src="require(`@/assets/images/top-titleBg.png`)">
              <h1>赣州蓉江新区智慧云脑</h1>
            <img :src="require(`@/assets/images/top-titleBg.png`)">
          </div>
        </div>
      </div>
    </vue-scroll>
  </div>
</template>

<script>
export default {
  data () {
    return {
    }
  },
  mounted () {
    this.$refs['vs'].scrollTo({ x: '50%' }, 500)
  }

}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .fixTopBox {
    width: 100%;
    height: 110px;
    overflow: auto;
    position: fixed;
    top: 0;
    left: 0;
    font-size: .07rem;
  }
  .topContaion{
    width: 100%;
    min-width: 1400px;
    height: 110px;
    padding-bottom: .2rem;
    overflow: hidden;
    background: url("../assets/images/top-line2.png") no-repeat;
    background-size: 100% 90%;
    background-position: bottom center;
  }
  .topBox{
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .topTitle{
    height: 100%;
    padding: 0 .6rem;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
  }
  .topTitle img{
    width: .5rem;
    height: .2rem;
    position: absolute;
    bottom: -.03rem;
  }
  .topTitle img:first-child{
    left: 0;
    transform: rotatey(-180deg);
  }
  .topTitle img:last-child{
    right:0;
  }
  .topTitle h1{
    font-size: 40px;
    letter-spacing: .02rem;
    background: linear-gradient(to right, #0072ff, #00eaff, #01aaff);
    -webkit-background-clip: text;
    color: transparent;
  }
</style>