Свойства CSS: Как выровнять последнюю строку элемента абзаца вправо
Перейти на страницу упражнений
Решение:
HTML-код:
<!DOCTYPE html>
<html>
<head>
<title>How to align the last line of a paragraph element to the right</title>
<style type="text/css">
p {
text-align: justify;
-moz-text-align-last: right;
text-align-last: right;
}
</style>
</head>
<body>
<h2><strong>w3resource Tutorial</strong></h2>
<p>CSS, stands for Cascading Style Sheet is a computer language to describe presentation (for example width, height, color, background color, alignment etc.) of HTML and XML (and XML based languages like XHTML, SVG) web documents. In all the examples of our tutorials, we have used HTML for implementing CSS.CSS, stands for Cascading Style Sheet is a computer language to describe presentation (for example width, height, color, background color, alignment etc.) of HTML and XML (and XML based languages like XHTML, SVG) web documents. In all the examples of our tutorials, we have used HTML for implementing CSS.CSS, stands for Cascading Style Sheet is a computer language to describe presentation (for example width, height, color, background color, alignment etc.) of HTML and XML (and XML based languages like XHTML, SVG) web documents. In all the examples of our tutorials, we have used HTML for implementing CSS.CSS, stands for Cascading Style Sheet is a computer language to describe presentation (for example width, height, color, background color, alignment etc.) of HTML and XML (and XML based languages like XHTML, SVG) web documents. In all the examples of our tutorials, we have used HTML for implementing CSS.</p>
</body>
</html>
Демонстрация в реальном времени:
См. Pen text-align-last-answer от w3resource ( @ w3resource ) в CodePen .
Поддерживаемый браузер
да | да | да | да | да |
Каков уровень сложности этого упражнения?
Новый контент: Composer: менеджер зависимостей для PHP , R программирования
disqus2code