用 CSS 對齊文字的最後一行
text-align-last 屬性用於對齊文字的最後一行。你可以嘗試執行以下程式碼以使用 CSS 對齊文字的最後一行
示例
<!DOCTYPE html> <html> <head> <style> .mydiv { text-align-last: right; } </style> </head> <body> <h1>text-align-last Property</h1> <div class = "mydiv"> <p>This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text.</p> </div> </body> </html>
輸出
廣告