HTML-код для отступа без использования blockquote (поэтому в следующей строке нет места)
Я пытаюсь создать блок текста с отступами без использования блочной цитаты. Причина, по которой я хочу это сделать, заключается в том, что блочная цитата добавляет дополнительное пространство между отступом блока текста и предыдущим абзацем.
Я хочу, чтобы фрагмент текста с отступом был заподлицо с фрагментом текста без отступа.
1 ответ:
Вы можете использовать padding-left и display: block CSS свойство, а затем обернуть текст для отступа в промежуток. Например:
<p> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. <span style="padding-left: 20px; display:block"> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. </span> It was popularised in the 1960s with the release of Letraset sheets containing Lore </p>