组件

  export default {

    data () {

      return {

        inditorIndex: 0

      }

    },

    props: {

      imgsrc: String,

      dataList: Array

    },

    methods: {

      handelEnter (item) {

        this.dataList.forEach(o => {

          o.isActive = false

        })

        item.isActive = true

        this.inditorIndex = item.colorIndex

      }

    }

  }

  .before_after {

    position: relative;

    & > img {

      width: 100%;

      display: block;

    }

    & > div {

      position: absolute;

      left: 0;

      right: 0;

      top: 0;

      bottom: 0;

      & > .el-row {

        height: 100%;

        &> .el-col {

          width: 33.33%;

          height: 100%;

          position: relative;

          transition: all .3s;

          overflow: hidden;

          & > .text {

            padding: 50px;

            text-align: center;

            box-sizing: border-box;

            position: absolute;

            width: 100%;

            height: 100%;

            top: 0;

            color: #fff;

            z-index: 12;

            transition: left .3s;

            & > h4 {

              font-size: 18px;

              font-weight: normal;

              position: relative;

              margin-bottom: 60px;

              &:after {

                content: '';

                position: absolute;

                height: 3px;

                width: 40px;

                background: #fff;

                left: 50%;

                top: 40px;

                margin-left: -20px;

              }

            }

            h5 {

              font-size: 18px;

              font-weight: normal;

              position: relative;

              margin-bottom: 20px;

              &:before {

                content: '';

                position: absolute;

                height: 1px;

                width: 30px;

                background: #fff;

                left: 50%;

                top: 50%;

                margin-left: -70px;

                z-index: -10;

              }

              &:after {

                content: '';

                position: absolute;

                height: 1px;

                width: 30px;

                background: #fff;

                left: 50%;

                top: 50%;

                /*transform: translateX(40px);*/

                margin-left: 40px;

                z-index: -10;

              }

            }

            p {

              font-size: 14px;

              line-height: 24px;

              padding: 0 25px;

              text-align: left;

            }

          }

          &:not(.active) {

            & > .text {

              left: 200%;

              &.after {

                left: 0;

              }

            }

          }

          &.active {

            width: 66.66%;

            & > .text {

              left: -200%;

              &.after {

                left: 0;

              }

            }

          }

          & > .layer {

            position: absolute;

            left: 0;

            right: 0;

            top: 0;

            bottom: 0;

            opacity: 0.6;

            background: #389CFF;

            z-index: 2;

          }

        }

      }

    }

  }

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 不会用代码框,所以看着有些乱套,,,,html部分 <!DOCTYPE html> 迅雷看看 ...
    这就是个帅气的名字阅读 1,583评论 0 0
  • 1. tab列表折叠效果 html: 能源系统事业部 岗位名称: 工作地点 岗位名...
    lilyping阅读 1,923评论 0 1
  • 各种纯css图标 CSS3可以实现很多漂亮的图形,我收集了32种图形,在下面列出。直接用CSS3画出这些图形,要比...
    剑残阅读 9,721评论 0 8
  • 问答题47 /72 常见浏览器兼容性问题与解决方案? 参考答案 (1)浏览器兼容问题一:不同浏览器的标签默认的外补...
    _Yfling阅读 13,844评论 1 92
  • 发现人越闲越懒,良好的习惯一旦不坚持就容易变成一种惰性,自我控制能力也会越来越差。 不能再把学习的习惯被惰性打败。...
    苏会ls阅读 99评论 0 1