css垂直水平线,CSS3使用弹性框实现带水平线标题和垂直线标题

CSS

语言:

CSSSCSS

确定

body {

text-align: center;

}

.heading-vr {

display: -webkit-inline-box;

display: -webkit-inline-flex;

display: -ms-inline-flexbox;

display: inline-flex;

-webkit-box-orient: vertical;

-webkit-box-direction: normal;

-webkit-flex-direction: column;

-ms-flex-direction: column;

flex-direction: column;

-webkit-align-content: center;

-ms-flex-line-pack: center;

align-content: center;

-webkit-box-pack: center;

-webkit-justify-content: center;

-ms-flex-pack: center;

justify-content: center;

-webkit-flex-wrap: nowrap;

-ms-flex-wrap: nowrap;

flex-wrap: nowrap;

-webkit-box-align: center;

-webkit-align-items: center;

-ms-flex-align: center;

align-items: center;

height: 100%;

}

.heading-vr:before,

.heading-vr:after {

content: "";

border-left: 2px solid;

height: 100%;

-webkit-box-flex: 1;

-webkit-flex: 1 1 0%;

-ms-flex: 1 1 0%;

flex: 1 1 0%;

}

.heading-vr:before {

margin-bottom: 12px;

}

.heading-vr:after {

margin-top: 12px;

}

.heading-hr {

display: -webkit-box;

display: -webkit-flex;

display: -ms-flexbox;

display: flex;

-webkit-align-content: center;

-ms-flex-line-pack: center;

align-content: center;

-webkit-box-pack: center;

-webkit-justify-content: center;

-ms-flex-pack: center;

justify-content: center;

-webkit-flex-wrap: nowrap;

-ms-flex-wrap: nowrap;

flex-wrap: nowrap;

-webkit-box-align: center;

-webkit-align-items: center;

-ms-flex-align: center;

align-items: center;

-webkit-box-orient: horizontal;

-webkit-box-direction: normal;

-webkit-flex-direction: row;

-ms-flex-direction: row;

flex-direction: row;

}

.heading-hr:before,

.heading-hr:after {

content: "";

border-top: 2px solid;

width: 100%;

-webkit-box-flex: 1;

-webkit-flex: 1 1 0%;

-ms-flex: 1 1 0%;

flex: 1 1 0%;

}

.heading-hr:before {

margin-right: 12px;

}

.heading-hr:after {

margin-left: 12px;

}

.height-200px {

height: 200px;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值