首页 > 其他 > 详细

标题两边带横线

时间:2018-12-25 18:54:09      阅读:187      评论:0      收藏:0      [点我收藏+]
 1 <!doctype>
 2 <html>
 3 <head>
 4     <meta charset="UTF-8">
 5     <meta name="viewport" content="width=device-width, initial-scale=1.0">
 6     <meta http-equiv="X-UA-Compatible" content="ie=edge">
 7     <title>Document</title>
 8 </head>
 9 <body>
10     <style>
11         .title-line{
12             width: 100%;
13             position: relative;
14             text-align: center;
15         }
16         .title-line span{
17             background:white;
18             padding:0 6px;
19         }
20         .title-line:after{
21             position: absolute;
22             content:"";
23             width: 100%;
24             height: 1px;
25             top:50%;
26             left: 0;
27             background:  black;  /*还可以颜色渐变*/
28             z-index: -1;
29         }
30     </style>
31     <div class="title-line">
32          <span>我是标题</span>
33     </div>
34 </body>
35 </html>

 

标题两边带横线

原文:https://www.cnblogs.com/chengyunshen/p/10175590.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!