Text opacity in CSS

前端 未结 2 1636
小蘑菇
小蘑菇 2021-01-21 04:19

Is there any way I could treat text inside of a wordpress widget, to make it semi transparent using an opacity funcion? Only limiting myself to the content of the following code

相关标签:
2条回答
  • 2021-01-21 04:32

    You can use rgba as the color attribute like this:

    color: rgba(0,0,0,0.5);
    

    The 0.5 at the end specifiies 50% opacity. This would apply only to the text, and not the containing element.

    You've got to watch the browser compatibility

    0 讨论(0)
  • 2021-01-21 04:33

    use rgba values:

    color: rgba(0,0,0, 0.2)
    
    0 讨论(0)
提交回复
热议问题