Gradient colour with Linear Gradient Border in text using css not working

前端 未结 2 1709
灰色年华
灰色年华 2021-01-13 18:50

I would like design £1 similar to the following image using CSS.

I would like to have some text with gradient colour, gradient border and t

2条回答
  •  情歌与酒
    2021-01-13 19:42

    Gradients on text

    When you need to set gradients on text css is not the tool to use.
    Its easier to use svg for advanced gradient and all complex shapes.

    Here is how i would recomend to create the svg:

    1. Define two gradient one for the background one for the text. (LinearGradient)
    2. Create background and text. (rect, and text, tspan)
    3. Set the stroke and fill of the elements to the LinearGradients.

    Here is how it would look:

    
    
       
          
          
             
             
          
          
             
             
          
       
       
       
       
          
             £1
          
       
    

提交回复
热议问题