Подробнее об этом свойстве и его значениях можно посмотреть на MDM, а в этом примере используется только одно: shape-outside: url(image.png);
Пример:
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:
1 2 3 4 5 6 |
<div class="shape-outside"> <img class="shape-img-1" src="image-1.png" /> <p>Текст</p> <img class="shape-img-2" src="image-2.png" /> <p>Текст</p> </div> |
CSS:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
.shape-outside { margin: 20px 0; } .shape-outside p { text-align: justify; font-family: Verdana, sans-serif; font-size: 16px; line-height: 1.38; } .shape-outside:after{ clear: both; display: table; content: " "; } .shape-outside .shape-img-1 { float: left; shape-outside: url(image-1.png); width: 252px; transform: translateX(-20px); } .shape-outside .shape-img-2 { float: right; shape-outside: url(image-2.png); width: 252px; transform: translateX(20px); } |
Обратите внимание:
Картинка должна быть на прозрачном фоне
Локально данное свойство может не работать
Век живи - век учись. Жаль такому оформлению раньше не научился