CSS颜色渐变

    xiaoxiao2021-03-25  169

    此为黑色到白色的渐变(自行改变颜色适应需求)

    .gradient{ background: #000000; background: -moz-linear-gradient(top, #000000 0%, #ffffff 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#000000), color-stop(100%,#ffffff)); background: -webkit-linear-gradient(top, #000000 0%,#ffffff 100%); background: -o-linear-gradient(top, #000000 0%,#ffffff 100%); background: -ms-linear-gradient(top, #000000 0%,#ffffff 100%); background: linear-gradient(to bottom, #000000 0%,#ffffff 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#ffffff',GradientType=0 );/*ie 6 7 8*/ } :root .gradient{filter:none;}/*for ie*/

    转载请注明原文地址: https://ju.6miu.com/read-15653.html

    最新回复(0)