123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <template>
- <div class="banner">
- <div class="block">
- <el-carousel indicator-position="none" arrow="never">
- <el-carousel-item v-for="item in 3" :key="item">
- <div class="wrap">
- <button class="ask-for">申请经纪商</button>
- </div>
- </el-carousel-item>
- </el-carousel>
- <div class="wrap-block">
- <LoginWindow></LoginWindow>
- </div>
- <div :class="{'black-line':true,'fix-bottom':scrolled}">
- <button class="line-button">申请经纪商</button>
- <span class="phoneNum">热线电话:+86 173 5471 8363</span>
- </div>
- </div>
- </div>
- </template>
- <script>
- import LoginWindow from './LoginWindow'
- export default {
- name: 'Banner',
- components: {LoginWindow},
- data () {
- return {
- scrolled:false
- }
- },
- methods:{
- handleScroll () {
- if (window.scrollY > 900) {
- this.scrolled = true;
- }else{
- this.scrolled = false;
- }
- }
- },
- mounted () {
- window.addEventListener('scroll', this.handleScroll)
- }
- }
- </script>
- <style scoped>
- .banner{
- text-align: left;
- }
- .el-carousel__item{
- background-size: auto 100%;
- }
- .el-carousel__item:nth-of-type(1) {
- background: url("../../static/images/banner1/banner.png") no-repeat 50%;
- background-size: auto 100%;
- }
- .el-carousel__item:nth-of-type(2) {
- background: url("../../static/images/banner1/banner1.png") no-repeat 50%;
- background-size: auto 100%;
- }
- .el-carousel__item:nth-of-type(3) {
- background: url("../../static/images/banner1/banner2.png") no-repeat 50%;
- background-size: auto 100%;
- }
- button.ask-for{
- margin: 425px 0 0 8px;
- width: 150px;
- height: 40px;
- font-size: 16px;
- color: #1f52c9;
- background: #fede00;
- border: none;
- cursor: pointer;
- }
- .wrap-block{
- width: 1200px;
- margin: 0 auto;
- position: absolute;
- left: 50%;
- margin-left: -600px;
- top: 0;
- margin-top: 180px;
- }
- .black-line{
- height: 100px;
- background-color: rgba(0,0,0,.5);
- width: 100%;
- margin: 0 auto;
- line-height: 100px;
- position: absolute;
- top: 800px;
- z-index: 100;
- text-align: center;
- }
- .fix-bottom{
- position: fixed;
- bottom: 0;
- top: auto;
- }
- .line-button{
- width: 140px;
- height: 40px;
- border-radius: 20px;
- border: 0;
- font-size: 18px;
- font-weight: 700;
- margin-right: 60px;
- cursor: pointer;
- background-color: #1a6fa6;
- color: #fff;
- }
- .phoneNum{
- color: #fff;
- font-size: 25px;
- font-weight: 700;
- }
- </style>
|