我有一个类似仪表板视图的交通灯,我必须为我的一个页面提供交通灯。但我不能在多个调整的情况下使横线运作。添加内联水平线
我想要什么:对我有什么Want
小提琴:https://jsfiddle.net/gunnersfan/dx19y3f4/
CSS:
.bubble {
height: 30px;
width: 30px;
color: white;
display: inline-block;
text-align: center;
vertical-align: center;
border-radius: 50%;
margin-right: 50px;
margin-left: 50px;
font-size: 90%;
}
.red-bg {
background: red;
}
.green-bg {
background: green;
}
.blue-bg {
background: blue;
}
.inline-div {
display: inline;
font-size: 75%;
font-family: verdana;
margin-left: 50px;
margin-right: 50px;
}
[表单元格之间的div CSS线(可能的重复http://stackoverflow.com/questions/25460005/css-line -this-table-cell-div) – jcaron
只是一个与你的问题无关的提示:使用'line-height'等于'height'来使你的数字在圆圈中垂直居中。在你的情况如此:'line-height:30px;' – fremail
谢谢@fremail,这是一个有用的提示。 – gunnersfan