zoukankan      html  css  js  c++  java
  • 各种浏览器设置背景颜色线性渐变的方式

    1、Firefox

    background:-moz-linear-gradient(top, red, red 50%,red,yellow 50%,yellow,yellow);

    2、Chrome、Safari

    background:-webkit-gradient(linear, left top, left bottom, color-stop(0.50, #ff0), color-stop(0.50, rgb(255, 0, 0)));

    3、IE

    filter:alpha(opacity=100 finishopacity=0 style=1 startx=0,starty=50,finishx=0,finishy=70) progid:DXImageTransform.Microsoft.gradient(startcolorstr=red,endcolorstr=blue,gradientType=0);
    -ms-filter:alpha(opacity=100 finishopacity=50 style=1 startx=0,starty=0,finishx=0,finishy=150) progid:DXImageTransform.Microsoft.gradient(startcolorstr=red,endcolorstr=blue,gradientType=0);
    /*IE8*/

      说明:startx,finishx等用的是百分比,但是不能带%(IE就是矫情)

    4、Opera

    background:-o-linear-gradient(top,red 20%,yellow 50%,green 80%);

      说明:具体怎么用不太清楚,这里有介绍:http://dev.opera.com/articles/view/css3-linear-gradients/

  • 相关阅读:
    GIT 相关
    createFile
    值传递、指针传递、引用传递
    Sightseeing trip
    find the longest of the shortest
    Laurenty and Shop
    Dima and Lisa
    Marina and Vasya
    Kolya and Tanya
    Two Substrings
  • 原文地址:https://www.cnblogs.com/acaciasun/p/3300554.html
Copyright © 2011-2022 走看看