Gradient borders

后端 未结 17 1644
一个人的身影
一个人的身影 2020-11-22 03:40

I\'m trying to apply a gradient to a border, I thought it was as simple as doing this:

border-color: -moz-linear-gradient(top, #555555, #111111);
         


        
17条回答
  •  天涯浪人
    2020-11-22 04:42

    try this code

    .gradientBoxesWithOuterShadows { 
    height: 200px;
    width: 400px; 
    padding: 20px;
    background-color: white; 
    
    /* outer shadows  (note the rgba is red, green, blue, alpha) */
    -webkit-box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.4); 
    -moz-box-shadow: 0px 1px 6px rgba(23, 69, 88, .5);
    
    /* rounded corners */
    -webkit-border-radius: 12px;
    -moz-border-radius: 7px; 
    border-radius: 7px;
    
    /* gradients */
    background: -webkit-gradient(linear, left top, left bottom, 
    color-stop(0%, white), color-stop(15%, white), color-stop(100%, #D7E9F5)); 
    background: -moz-linear-gradient(top, white 0%, white 55%, #D5E4F3 130%); 
    }
    

    or maybe refer to this fiddle: http://jsfiddle.net/necolas/vqnk9/

提交回复
热议问题