html纵向文本,html – 垂直对齐CSS圈中多行的文本
我創(chuàng)建了一個(gè)包含文本的圓圈,文本需要始終居中.很簡(jiǎn)單,我已經(jīng)找到了很多例子,例如使用line-height在一行中使用單詞.
我的問(wèn)題是文本有時(shí)會(huì)包含一行,有時(shí)是兩行,有時(shí)是三行,我無(wú)法讓它工作.
有任何想法嗎?
I’ve created a fiddle here with three examples.
HTML:
LoremLorem ipsumLorem ipsum dolorCSS:
.container{
position: relative;
width: 70px;
display: inline-block;
}
.splash {
border-radius: 50%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
height: 70px;
width: 70px;
background: green;
color: white;
position: absolute;
overflow: hidden;
display: table-cell;
text-align: center;
vertical-align: middle;
transform: rotate(15deg);
-ms-transform: rotate(15deg);
-webkit-transform: rotate(15deg);
}
總結(jié)
以上是生活随笔為你收集整理的html纵向文本,html – 垂直对齐CSS圈中多行的文本的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 杭州信达之江壹品产权年限多少年?
- 下一篇: css让背景图片显示透明遮罩_CSS项目