在html中怎样加圆点,css伪类-小圆点
項目需求:在每個單元格的前面加一個小圓點,效果圖如下:
效果圖.jpg
搜了一大堆文章,加小圓點的方法無非就是設(shè)置width、height、border-raduis。可是來來回回試了好多遍,就是樣式加不上,汗顏~
偶然間看一大神說必須加上display:inline-block;才會生效,我的天吶,不會是真的吧。對,就是這個樣子滴,附上完整的代碼,可隨意ctrl c+v
美句子哈哈山有木兮木有枝,心悅君兮君不知。人生若只如初見,何事秋風(fēng)悲畫扇。十年生死兩茫茫,不思量,自難忘。曾經(jīng)滄海難為水,除卻巫山不是云。玲瓏骰子安紅豆,入骨相思知不知。只愿君心似我心,定不負(fù)相思意。平生不會相思,才會相思,便害相思。入我相思門,知我相思苦。.headers {
border-radius: @border-radius;
border: 1px solid @border-hr-color;
margin: 15px 0 24px;
overflow: hidden;
.header {
background-color: @table-th-bg;
height: 42px;
line-height: 42px;
color: @font-content-color;
font-weight: bold;
padding-left: 16px;
}
.con-items {
display: flex;
flex-wrap: wrap;
}
.item {
position: relative;
cursor: default;
box-sizing: border-box;
width: calc((100% + 3px) / 3);
border: 1px solid @border-hr-color;
height: 41px;
line-height: 41px;
padding-left: 32px;
margin-bottom: -1px;
margin-left: -1px;
font-size: @font-size-normal;
color: @primary-blue-color;
}
.item:nth-child(3n+0) { // 此行為了解決細(xì)線邊框問題
border-right: none;
}
.item::before { // 小圓點在這里
content: '';
position: absolute;
left: 16px;
top: 45%;
border: 1px solid @primary-blue-color;
background-color: @primary-blue-color;
display: inline-block; // 此句為css樣式展示重點🏁
width: 3px;
height: 3px;
border-radius: 50%;
margin-right: 12px;
}
}
總結(jié)
以上是生活随笔為你收集整理的在html中怎样加圆点,css伪类-小圆点的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 第五讲 中外数学名题趣题欣赏与解析
- 下一篇: 智能家居新体验:什么样的数据让语音交互更