CSS selector for sentences after first sentence -
i have question css selector. want select sentences after first sentence in container. first sentence there no problem:
:first-line
but can't find way select sentences "after first line". tried don't working.
:not(:first-line)
here fiddle selected first sentence don't solve problem. http://jsfiddle.net/zono/2bdx8/ best regards.
the trick height of each line defaults 1em. setting max height , overflow hidden show first line of sentence.
p { max-height: 1em; overflow: hidden; }
another approach use text-overflow: ellipsis. more user-friendly indicates sentence has more text , trimmed.
http://jsfiddle.net/wws6l/11/
p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
Comments
Post a Comment