Первое изображение: это предполагаемый вид в дизайне экрана. Форма SVG находится за контентом и частично перекрывается в правом < /p>
Второе изображение: это то, что я сейчас получаю. SVG либо смешивается, так или не уважает поток. Также остается тонкая линия пикселей между фоном Div и Svg. < /P>
Какой лучший способ достичь этого? В качестве псевдоэлемента (:: после) на Red Div < /p>
Что я хочу: < /p>
- S-образный SVG должен быть визуально частью фона Div. < /p>
< /li>
Идеально SVG - The shape should align consistently to the right edge of the div and scale with the div’s height.
Код: Выделить всё
.content-wrapper {
width: 50%;
background-color: red;
border-bottom-left-radius: 16px;
position: relative;
}
.content-wrapper::after {
content: " ";
display: inline-block;
height: 100%;
width: min-content;
position: absolute;
left: 100%;
top: 0;
/*Sorry, unsure how to embed the proper svg here*/
background: url("https://disk.sample.cat/samples/svg/hugging-face.svg") no-repeat;
background-size: contain;
}< /code>
Lorem ipsum dolor, sit amet consectetur adipisicing elit.
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Inventore blanditiis nemo doloremque laudantium cupiditate.
svg should show up to the right of the box.Подробнее здесь: https://stackoverflow.com/questions/797 ... it-part-of
Мобильная версия