符号换行和文字两端对齐充满当前行 & 解决ios 父元素 有定位时 滚动条失效

1、符号换行和文字两端对齐充满当前行

在做项目时经常会遇到一放一些文字,文字右端排列不整齐和标点符号换到下一行开头;

在css总增加 

word-break: normal; 
text-align: justify;

2、解决ios 父元素 有定位时 滚动条失效

最近在做一个项目,遇到的一个问题

里面有一个功能是点击按钮弹出一个蒙层,蒙层上面显示一些图片文字,显示内容的模块有高度限制,内容较多就会超出内容模块的高度,就需要用到滚动条。

但是在ios上发现滚动条失效了,完全不能滑动了

下面代码段:

主要这里!!!

 

<div class="overlay_module" v-show="" @click=" = false">
    <div class="correct_answer" @click.stop="">
        <p class="ca_title">正确答案</p>
        <p class="ca_answer">ABC</p>
        <div class="ca_content">
            <img src="" alt="">
            <div class="ca_c_tips">
                <p>小贴士</p>
                <div class="ca_c_t_shadow"></div>
            </div>
            <div class="ca_c_text">
                <p>一大片文字</p>
            </div>
        </div>
    </div>
</div>
p {
    word-break: normal; 
    text-align: justify;
}
.overlay_module {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, .6);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: .3s;
}

.correct_answer {
    width: 343px;
    background: linear-gradient(180deg, #FFEEE2 0%, #fff 30%, #fff 100%);
    border-radius: 10px;
    border: 1px solid #FFFFFF;
    .ca_title {
        font-size: 18px;
        font-weight: 600;
        color: #333333;
        line-height: 25px;
        text-align: center;
        margin: 24px 0 16px 0;
    }
    .ca_answer {
        font-size: 18px;
        font-weight: 600;
        color: #D93C79;
        line-height: 25px;
        text-align: center;
        margin-bottom: 23px;
    }
    .ca_content {
        width: calc(100% - 6px);
        padding: 9px 0 50px 0;
        margin: 23px auto 5px auto;
        background: url() no-repeat;
        background-size: 100% 100%;
        img {
            width: calc(100% - 46px);
            display: block;
            margin: 0 auto 12px auto;
        }
        .ca_c_tips {
            margin: 0 0 10px 16px;
            position: relative;
            display: inline-block;
            p {
                display: inline-block;
                font-size: 14px;
                font-weight: 500;
                color: #333333;
                line-height: 20px;
                position: relative;
                z-index: 2;
            }
            .ca_c_t_shadow {
                width: 100%;
                height: 8px;
                background: #F7B500;
                position: absolute;
                left: 0;
                bottom: 2px;
                z-index: 1;
            }
        }
        .ca_c_text {
            height: 240px;
            margin: 0 16px;
            overflow: auto;
            -webkit-overflow-scrolling: auto;
            p {
                font-size: 14px;
                font-weight: 400;
                color: #666666;
                line-height: 20px;
                margin-bottom: 8px;
            }
            >>> span {
                font-weight: 600;
            }
        }
    }
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值