css实现线条样式(中间高亮,两边透明)

.line{
width: 100%;
    height: 2px;
    background: linear-gradient(
            to right,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 10%,
            rgba(255, 255, 255, 0.3) 20%,
            rgba(255, 255, 255, 0.4) 30%,
            rgba(255, 255, 255, 0.5) 40%,
            rgba(255, 255, 255, 0.8) 50%,
            rgba(255, 255, 255, 0.5) 60%,
            rgba(255, 255, 255, 0.4) 70%,
            rgba(255, 255, 255, 0.3) 80%,
            rgba(0, 0, 0, 0) 90%,
            rgba(0, 0, 0, 0) 100%)
}

 

posted @ 2018-10-16 11:12  欧辰0312  阅读(4378)  评论(0编辑  收藏  举报