Not sure if this is possible: H2: no (: first line)

As I mentioned in the title, I'm not sure if it is me and my coding - “skills” or just the concept of inconsistency:

Can I change the lines after: the first line of the H1 and H2 tags?

It was for an experiment, so not everything is too important, I wanted to customize names such as my business logo: the second line is rotated 180 °:

H2:not(:first-line){-webkit-transform: rotate(-18deg);}

+6
source share
2 answers

my colleague had the same question.

So let's say you have a 3 line paragraph.

Performing:

p:first-line { /* CSS */ }

You just take into account the first line of your paragraph, right?


So basically, if you write:

 p { ... } p:first-line { ... } 

The first declaration is yours :not(:first-line) :)

+2
source

Yes. See if this example works for you.

 h2:not(:nth-child(1)){-webkit-transform: rotate(-18deg);} 
+1
source

Source: https://habr.com/ru/post/985615/


All Articles