CSS-свойство shape-outside используется для того, чтобы создать внутри элемента форму, вокруг которой будет происходить обтекание.

Подробнее об этом свойстве и его значениях можно посмотреть на MDM, а в этом примере используется только одно: shape-outside: url(/blog/img/blank.webp);

Пример:

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. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

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. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

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. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

HTML:

CSS:

Обратите внимание:

Картинка должна быть на прозрачном фоне

Локально данное свойство может не работать

Смотрите также:

Универсальные способы выравнивания текста по вертикали

Простое решение на JS для сохранения переменной в файл на компютер пользователя

Оригинальный зффект скремблирования текста на JavaScript

Добавить комментарий:

Ваш комментарий отправлен!

Комментарии:

  • Александр:

    [img]https://mpmz1.ru/?p=22109&preview=true[/img] Вот ссылка на черновик к предыдущему комментарию. Пока не буду редактировать.

    Ответить
    • Alexander:

      Дайте ссылку на страницу

      Ответить
      • Александр:

        Вот ссылка на страницу. Это черновик. Будет изменяться. Пока вот.[img]https://mpmz1.ru/?p=22109&preview=true[/img]

        Ответить
      • Александр:

        Картинка через коммент почему-то не проходит. Вот ссылка на черновик страницы - https://mpmz1.ru/?p=22109&preview=true

        Ответить
      • Александр:

        Я всё понял. Убрал часть кода с общего файла стилей с ссылками на картинки и вставил эту часть кода в редактор страницы. И всё стало на свои места. Спасибо!

        Ответить
  • Александр:

    Гениально! Однако, непонятно, что означает "Локально данное свойство может не работать". В моём случае текст наползает на часть моей картинки, аналогичной примеру и без фона в "png". Не могу вставить соответствующий скан, а ссылка на черновик нереальна.

    Ответить
  • Эрнест:

    Век живи - век учись. Жаль такому оформлению раньше не научился

    Ответить