Thuộc tính dấu chấm câu treo trong CSS
Thí dụ
Đặt một dấu chấm câu (nếu có) bên ngoài mép bắt đầu của dòng đầu tiên trong phần tử <p>:
p
{
hanging-punctuation: first;
}
Định nghĩa và Cách sử dụng
Thuộc hanging-punctuation
tính chỉ định xem một dấu chấm câu có thể được đặt bên ngoài hộp dòng ở đầu hoặc ở cuối dòng văn bản đầy đủ hay không.
Giá trị mặc định: | không ai |
---|---|
Thừa hưởng: | Đúng |
Hoạt hình: | không. Đọc về hoạt hình |
Phiên bản: | CSS3 |
Cú pháp JavaScript: | đối tượng .style.hangedPunctuation = "đầu tiên" |
Hỗ trợ trình duyệt
Không có trình duyệt chính nào hỗ trợ thuộc tính dấu chấm câu treo.
Property | |||||
---|---|---|---|---|---|
hanging-punctuation | Not supported | Not supported | Not supported | 10+ | Not supported |
Cú pháp CSS
hanging-punctuation: none|first|last|allow-end|force-end|initial|inherit;
Giá trị tài sản
Value | Description |
---|---|
none | No punctuation mark may be placed outside the line box at the start or at the end of a full line of text |
first | Punctuation may hang outside the start edge of the first line |
last | Punctuation may hang outside the end edge of the last line |
allow-end | Punctuation may hang outside the end edge of all lines if the punctuation does not otherwise fit prior to justification |
force-end | Punctuation may hang outside the end edge of all lines. If justification is enabled on this line, then it will force the punctuation to hang |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |