您好,登錄后才能下訂單哦!
小編給大家分享一下CSS怎么制作對話框氣泡,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!
HTML代碼
<divclass="balloon-left">
左邊
</div>
CSS代碼
.balloon-left{
position:relative;
display:inline-block;
padding:015px;
width:auto;
min-width:150px;
height:40px;
line-height:34px;
text-align:center;
background:#44FF44;
border:3pxsolid#000000;
z-index:0;
}
接著,我們使用:before來制作箭頭部分,用:after來制作箭頭的邊
CSS代碼
.balloon-left:before{
border-style:solid;
border-width:10px10px10px0;
border-color:transparent#44FF44transparenttransparent;
content:"";
position:absolute;
top:50%;left:-8px;
margin-top:-9px;
display:block;
width:0px;
height:0px;
z-index:0;
}
.balloon-left:after{
border-style:solid;
border-width:11px11px11px0;
border-color:transparent#000000transparenttransparent;
content:"";
position:absolute;
top:50%;left:-12px;
margin-top:-10px;
display:block;
width:0px;
height:0px;
z-index:-1;
}
看完了這篇文章,相信你對“CSS怎么制作對話框氣泡”有了一定的了解,如果想了解更多相關(guān)知識,歡迎關(guān)注億速云行業(yè)資訊頻道,感謝各位的閱讀!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。