Vue实现侧边弹框

组件代码

<template>
    <div class="donate-content-div">
        <div class="content">
            <slot name="content"></slot>
        </div>
        <strong style="fornt-weight: bold">
            <span id="donate-content-div">
                <slot name="title"></slot>
            </span>
        </strong>
    </div>
</template>
<script>
export default{
    setup() {
        return {}
    }
}
</script>
<style scoped>
.donate-content-div:hover{
    transition: '0.3s all ease-in';
    left: 0
}
.content-titles{
    max-height: 428px;
    position: relative;
    overflow: auto;
}
span#content-div-title{
    color: red
}
span#donate-content-div{
    position: absolute;
    left: 345px;
    -webkit-transform: rotate(90deg);
    transform: rotate(0deg);
    width: auto;
    background: #ffc82c;
    height: auto;
    top: 15px;
    padding: 7px 6px;
    border-redius: 15px;
    color: #123456;
    font-family: initial;
    font-size: 18px;
}
.donate-content-div{
    border: 1px solid #0099d6;
    padding: 20px;
    background-color: rgba(128, 128, 128, 0.4);
    display: inline-block;
    width: 304px;
    max-height: 500px;
    left: -345px;
    position: fixed;
    top: 40%;
    z-index: 9999;
    transition: left .35s ease-in-out;
}
.content{
    max-height: 500px;
    overflow: auto;
}
</style>

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值