Home > OS >  if i place opacity : 0 inside fist-line pseudo class it is not working do you know why
if i place opacity : 0 inside fist-line pseudo class it is not working do you know why

Time:10-04

if i place opacity : 0 inside fist-line pseudo class it is not working do you know why is it any priority issue.

css code :

p::first-line{
    color : green;
    font-size : 30px;
    opacity : 0
}


<p>Really can't remember where I left my spine
        Carrying my body in a bag for dimes
        Hidden in the pages of the New York Times at home
        And maybe I'll be better if I take my meds
        Ain't a double header if you lose your head
        Tried a medication that I bought instead</p>

CodePudding user response:

Opacity is not one of the values you can use to style first-line.

You can set color though so transparent may give you the look you want.

CodePudding user response:

You can not use all kinds of CSS properties with the :first-line pseudo-class. Here is the list of properties allowed to be used- https://developer.mozilla.org/en-US/docs/Web/CSS/::first-line#allowable_properties.

You can try playing with color or background property based on your requirement. Setting it transparent might fulfill your need.

  • Related