Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not sure if feasible: H2:not(:first-line)

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);}

like image 512
David Braun Avatar asked Apr 21 '15 15:04

David Braun


People also ask

Which answer is an example of a type selector?

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).

How do you select child elements in CSS?

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.

Which line of code represents a universal 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 .


1 Answers

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) :)

like image 126
LukyVj Avatar answered Nov 15 '22 22:11

LukyVj