As I mention in the title, I'm not sure whether it's me and my coding-"skills", or just a misfit concept:
Can I change the Lines after :first-line of H1 and H2 tags?
This was for an experiment, so not all too important, I wanted to style the titles like my business's logo: the second line is rotated 180°:
H2:not(:first-line){-webkit-transform: rotate(-18deg);}
The type selector matches all the elements specified in a list with the given value to determine the elements to which the CSS rules are to be applied. Example: h1, h2, p { font-family: sans-serif; } Here font-family property applied on h1 & h2 heading elements and also on paragraph element(P).
The child combinator ( > ) is placed between two CSS selectors. It matches only those elements matched by the second selector that are the direct children of elements matched by the first. Elements matched by the second selector must be the immediate children of the elements matched by the first selector.
The CSS universal selector ( * ) matches elements of any type. The universal selector is a special type selector and can therefore be namespaced when using @namespace .
a colleague of mine had the same question.
So let's say, you have a paragraph of 3 lines.
By doing :
p:first-line { /* CSS */ }
You just take in consideration the first line of your paragraph, right ?
So, basically, if you write :
p { ... }
p:first-line { ... }
The first declaration IS your :not(:first-line)
:)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With