Home  >  Article  >  Web Front-end  >  How to use punctuation-trim attribute

How to use punctuation-trim attribute

青灯夜游
青灯夜游Original
2019-02-11 17:59:402827browse

The punctuation-trim attribute is used to specify whether the beginning or ending punctuation character should be trimmed when it appears on a line, or adjacent to another full-width punctuation character.

How to use punctuation-trim attribute

CSS3 punctuation-trim attribute

Function:punctuation-trim attribute Specifies whether punctuation is trimmed if it is at the beginning or end of a line, or adjacent to another full-width punctuation mark.

Syntax:

punctuation-trim: none|start|end|allow-end|adjacent;

none: Do not trim opening or closing punctuation.

start: Trim open punctuation at the end of each line.

end: Trim the closing punctuation mark at the end of each line.​

allow-end: Trim the closing punctuation at the end of each line if there is another reason why it does not fit before.

adjacent: Trim opening punctuation if the previous adjacent character is a full-width opening, middle or end punctuation, or ideographic space. Trim ending punctuation if the next adjacent character is a full-width closing or intermediate punctuation, or ideographic space.

Note: Currently mainstream browsers do not support the punctuation-trim attribute.

CSS3 Example of using the punctuation-trim attribute

Trim the opening punctuation at the beginning of each line in the p element:

p
{
punctuation-trim:start;
}

The above is the detailed content of How to use punctuation-trim attribute. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn