html中after对应的样式怎么写,css – 如何创建内联样式:before和:after
我從
http://www.ilikepixels.co.uk/drop/bubbler/生成一個泡沫聊天
在我的頁面,我把一個數字里面
.bubble {
position: relative;
width: 20px;
height: 15px;
padding: 0;
background: #FFF;
border: 1px solid #000;
border-radius: 5px;
}
.bubble:after {
content: "";
position: absolute;
top: 4px;
left: -4px;
border-style: solid;
border-width: 3px 4px 3px 0;
border-color: transparent #FFF;
display: block;
width: 0;
z-index: 1;
}
.bubble:before {
content: "";
position: absolute;
top: 4px;
left: -5px;
border-style: solid;
border-width: 3px 4px 3px 0;
border-color: transparent #000;
display: block;
width: 0;
z-index: 0;
}
我想要的氣泡的背景顏色根據其中的數字通過rgb改變
所以如果我的div
100我想要的顏色是rgb(100,255)
事情是這不影響三角形。
我如何寫內聯css,使它將包括:before和:after?
總結
以上是生活随笔為你收集整理的html中after对应的样式怎么写,css – 如何创建内联样式:before和:after的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 替换html标签内容正则表达式,正则表达
- 下一篇: html5 摄像头拍摄视频教程,html