2
チャットの矢印を画像に表示して、矢印の背景に画像が表示されるようにする方法。また、画像にはボーダー半径を丸めることができます。 ちょうど下の画像のように。chat bubble on image
ありがとうございます。
.userMsgImage {
position: relative;
min-height: 40px;
margin-left: 20px;
}
.userMsgImage a,
.userMsgImage img {
border-radius: 4px;
display: block;
max-width: 200px;
}
.userMsgImage a img {
margin-left: 0;
}
.userMsgImage::after,
.userMsgImage::before {
left: 0px;
content: "";
width: 0px;
position: absolute;
border-color: transparent transparent transparent rgb(255, 255, 255);
border-style: solid;
}
.userMsgImage::before {
top: 0px;
height: 30px;
border-width: 0px 0px 40px 40px;
}
.userMsgImage::after {
top: 12px;
height: calc(100% - 12px);
border-width: 40px 0px 0px 40px;
}
<div class="userMsgImage">
<a href="https://images.techhive.com/images/article/2014/05/skype-logo-open-graph-100272883-large.jpg" target="_blank">
<img src="https://images.techhive.com/images/article/2014/05/skype-logo-open-graph-100272883-large.jpg" alt="loading" width="200px">
</a>
</div>
一つの方法は、矢印に対して透明である画像を使用することで、絶対位置。 – Soolie
はい、そうですが、** border-radius **の主な問題と**矢印の部分**の後ろのイメージです。 –