css 相关

    技术2022-07-10  139

    背景渐变:

    .btn-gray{ background: -moz-linear-gradient(left, #22bcf0 40%, #4872c3 100%); background: -webkit-linear-gradient(left, #22bcf0 40%, #4872c3 100%); background: -o-linear-gradient(left, #22bcf0 40%, #4872c3 100%); background: -ms-linear-gradient(left, #22bcf0 40%, #4872c3 100%); background: linear-gradient(left, #22bcf0 40%, #4872c3 100%); }

     

     

     

     

    三角形:

    span{ width: 0; height: 0; border-top: 15px solid transparent; border-left: 15px solid #de512c; border-bottom: 15px solid transparent; }

    设置文字超过指定行数显示省略号:

    span{ display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }

    给父元素设置子元素平均显示:

    span{ display: flex; justify-content: space-between; flex-flow: row wrap; }

    css 动态计算css宽度(注意空格)

    width: calc(100% - 389px);

     

    Processed: 0.011, SQL: 9