Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 将字形图标居中放置在div中_Css_Twitter Bootstrap_Html - Fatal编程技术网

Css 将字形图标居中放置在div中

Css 将字形图标居中放置在div中,css,twitter-bootstrap,html,Css,Twitter Bootstrap,Html,这是小提琴: 我需要在div中垂直和水平居中放置一个glyphicon 代码如下: HTML: } } }您需要添加以下内容: .item{ ... text-align: center; } .item span{ ... line-height: 150px; } .container{ width: 600px; margin: 0 auto; border: 1px solid #000; .item{ width: 150px; height: 1

这是小提琴:

我需要在div中垂直和水平居中放置一个glyphicon

代码如下: HTML:

}

}

}

您需要添加以下内容:

.item{
    ...
    text-align: center;
}
.item span{
    ...
    line-height: 150px;
}

.container{
width: 600px;
margin: 0 auto;
border: 1px solid #000;
.item{
width: 150px;
height: 150px;
border: 1px solid #ddd;
.item span{
font-size: large;
.item{
    ...
    text-align: center;
}
.item span{
    ...
    line-height: 150px;
}