html – 圆圈内的文本和容器

html – 圆圈内的文本和容器,第1张

概述我在这里有一个Bootply: http://www.bootply.com/XLGE6Vpjov 我需要在容器中居中的3个圆圈,然后我需要里面的文本水平和垂直居中. 如何将文本垂直居中? 我知道边界半径在IE8中不起作用,但我不介意它在那里是一个正方形. <div class="container"> <div class="row"> 我在这里有一个Bootply: http://www.bootply.com/XLGE6Vpjov

我需要在容器中居中的3个圆圈,然后我需要里面的文本水平和垂直居中.

如何将文本垂直居中?

我知道边界半径在ie8中不起作用,但我不介意它在那里是一个正方形.

<div >            <div >                <div >                    <p >Some Text here Some text here Some text here Some text here</p>                </div>                <div >                    <p >Some Text here</p>                </div>                <div >                    <p >Some More Text here</p>                </div>            </div>        </div>        .block{            border: 1px solID red;            text-align: center;            vertical-align: mIDdle;        }        .circle{            background: red;            border-radius: 200px;            color: white;            height: 200px;            Font-weight: bold;            wIDth: 200px;        }
解决方法 你可以尝试像这样的 http://jsfiddle.net/6cygbd37/1/

见下面的工作示例:

/*--css--*/ .block {    border: 1px solID red;    text-align: center;    vertical-align: mIDdle;}.circle {    background: red;    border-radius: 200px;    color: white;    height: 200px;    Font-weight: bold;    wIDth: 200px;    display: table;    margin: 20px auto;}.circle p {    vertical-align: mIDdle;    display: table-cell;}
<!--HTML--><link href="http://netdna.bootstrapcdn.com/Font-awesome/4.3.0/CSS/Font-awesome.min.CSS" rel="stylesheet"> <div >    <div >        <div >            <div >                <p>Some Text here Some text here</p>            </div>        </div>        <div >            <div >                <p>Some Text here</p>            </div>        </div>        <div >            <div >                <p>Some More Text here</p>            </div>        </div>    </div></div>
总结

以上是内存溢出为你收集整理的html – 圆圈内的文本和容器全部内容,希望文章能够帮你解决html – 圆圈内的文本和容器所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1137356.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-30
下一篇2022-05-30

发表评论

登录后才能评论

评论列表(0条)

    保存